Waht is different between setDimensions with setWidth setHeight #10104
Replies: 1 comment
-
setDimensions is the good one. /**
* Sets width of this canvas instance
* @param {Number|String} value Value to set width to
* @param {Object} [options] Options object
* @param {Boolean} [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions
* @param {Boolean} [options.cssOnly=false] Set the given dimensions only as css dimensions
* @deprecated will be removed in 7.0
*/
setWidth(
value: TSize['width'],
options?: { backstoreOnly?: true; cssOnly?: false },
): void;
setWidth(
value: CSSDimensions['width'],
options?: { cssOnly?: true; backstoreOnly?: false },
): void;
setWidth(value: number, options?: never) {
return this.setDimensions({ width: value }, options);
} it just use setDimensions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
canvas.setDimensions({ width: 800, height: 300 })
vscanvas.setWidth(800)
canvas.setHeight(300)
setDimensions Is it a grammatical sugar?
Beta Was this translation helpful? Give feedback.
All reactions