Core.prototype.setScale()
The setScale() method sets the scale applied to the <svg> tag.
If the scale is greater than 1, the drawing area will be larger and the person and props will be smaller.
If the scale is less than 1, the drawing area will be smaller and the person and props will be larger.
Syntax
setScale(scale)
Parameters
- scale
- A positive real value representing the scale. If you specify a value less than 0 or a non-numeric value, it will be ignored. You can pass the return value of BasicCreator.prototype.getScale() as is.
Return value
none
Examples
const core = new jmotion.Core("#board");
core.setScale(2);