mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
update CHANGELOG with new version
This commit is contained in:
parent
3e7d5ce7af
commit
adca6efe77
@ -126,10 +126,10 @@ export class Image extends Shape<ImageConfig> {
|
|||||||
context.fillStrokeShape(this);
|
context.fillStrokeShape(this);
|
||||||
}
|
}
|
||||||
getWidth() {
|
getWidth() {
|
||||||
return this.attrs.width ?? this.image()?.width;
|
return this.attrs.width ?? (this.image() as any)?.width;
|
||||||
}
|
}
|
||||||
getHeight() {
|
getHeight() {
|
||||||
return this.attrs.height ?? this.image()?.height;
|
return this.attrs.height ?? (this.image() as any)?.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,7 +146,11 @@ export class Image extends Shape<ImageConfig> {
|
|||||||
* layer.draw();
|
* layer.draw();
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
static fromURL(url: string, callback: (img: Image) => void, onError: OnErrorEventHandler = null) {
|
static fromURL(
|
||||||
|
url: string,
|
||||||
|
callback: (img: Image) => void,
|
||||||
|
onError: OnErrorEventHandler = null
|
||||||
|
) {
|
||||||
var img = Util.createImageElement();
|
var img = Util.createImageElement();
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
var image = new Image({
|
var image = new Image({
|
||||||
|
Loading…
Reference in New Issue
Block a user