deprecate some methods

This commit is contained in:
Anton Lavrenov
2021-05-21 10:45:44 -05:00
parent 734a66a75c
commit 29badd7f6c
10 changed files with 1429 additions and 1450 deletions

View File

@@ -108,9 +108,6 @@ var ABSOLUTE_OPACITY = 'absoluteOpacity',
].join(SPACE),
SCALE_CHANGE_STR = ['scaleXChange.konva', 'scaleYChange.konva'].join(SPACE);
// TODO: can we remove children from node?
const emptyChildren = [];
let idCounter = 1;
// create all the events here

View File

@@ -197,24 +197,12 @@ export class Shape<
shapes[key] = this;
}
/**
* get canvas context tied to the layer
* @method
* @name Konva.Shape#getContext
* @returns {Konva.Context}
*/
// TODO: remove method
getContext() {
Util.warn('shape.getContext() method is deprecated. Please don not use it.');
return this.getLayer().getContext();
}
/**
* get canvas renderer tied to the layer. Note that this returns a canvas renderer, not a canvas element
* @method
* @name Konva.Shape#getCanvas
* @returns {Konva.Canvas}
*/
// TODO: remove method
getCanvas() {
Util.warn('shape.getCanvas() method is deprecated. Please don not use it.');
return this.getLayer().getCanvas();
}

View File

@@ -25,7 +25,7 @@ var STAGE = 'Stage',
MOUSEMOVE = 'mousemove',
MOUSEDOWN = 'mousedown',
MOUSEUP = 'mouseup',
// TODO: add them into "on" method docs and into site docs
POINTERMOVE = 'pointermove',
POINTERDOWN = 'pointerdown',
POINTERUP = 'pointerup',