mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 21:34:50 +08:00
deprecate some methods
This commit is contained in:
@@ -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
|
||||
|
||||
16
src/Shape.ts
16
src/Shape.ts
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user