mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
deprecate some methods
This commit is contained in:
parent
734a66a75c
commit
29badd7f6c
@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## **NOT RELEASED V8**
|
||||
|
||||
This is going to be a very large release.
|
||||
This is going to be a very large release. The long term of Konva API is to make it simpler and faster. So when possible I am trying to optimize the code and remove unpopular/confusing API methods.
|
||||
|
||||
**BREAKING:**
|
||||
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "konva",
|
||||
"version": "8.0.0-0",
|
||||
"version": "8.0.0-2",
|
||||
"author": "Anton Lavrenov",
|
||||
"files": [
|
||||
"README.md",
|
||||
|
@ -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',
|
||||
|
@ -909,7 +909,6 @@ describe('DragAndDrop', function () {
|
||||
]
|
||||
);
|
||||
});
|
||||
// TODO: try to move two shapes on different stages
|
||||
|
||||
it('can stop drag on dragstart without changing position later', function () {
|
||||
var stage = addStage();
|
||||
|
@ -30,8 +30,6 @@ describe('Text', function () {
|
||||
assert.equal(layer.getContext().getTrace(), trace);
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
// TODO: what is the best UX here?
|
||||
it('check text with FALSY values', function () {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
@ -385,7 +385,6 @@ describe('TouchEvents', function () {
|
||||
);
|
||||
|
||||
// now try to make two touches at the same time
|
||||
// TODO: should we trigger touch end first?
|
||||
simulateTouchStart(
|
||||
stage,
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user