Why I cannot use Konva.Image() in Konva.Shape.fillPatternImage(imageObj)?
问题 The following is an example from Konvajs library to load an image: var imageObj = new Image(); imageObj.onload = function() { var yoda = new Konva.Image({ x: 50, y: 50, image: imageObj, width: 106, height: 118 }); And here is my code var annotation = new Konva.Line({ points: this.contour, stroke: color, closed: true, strokeWidth: 1 }); var nativeImageObject = new Image(); nativeImageObject.onload = function() { var konvaImage = new Konva.Image({ image: nativeImageObject }); annotation