Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initResize() {
return new Konva.Rect({
x: this.halfWidth + this.cropRadius * 0.86 - 8,
y: this.halfHeight + this.cropRadius * -0.5 - 8,
width: 16,
height: 16,
draggable: true,
dragBoundFunc: function (pos) {
return {
x: this.getAbsolutePosition().x,
y: pos.y
}
}
})
}
initShading() {
return new Konva.Rect({
x: 0,
y: 0,
width: this.width,
height: this.height,
fill: this.shadingColor,
strokeWidth: 4,
opacity: this.shadingOpacity
})
}