@zcomponent/core 1.29.0-beta.1 → 1.29.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,6 +19,7 @@ interface ConstructionProps {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Manages touch gestures for scaling and rotating elements.
|
|
22
|
+
* @deprecated Use the GestureTransform component instead. This context will be removed in the next major version.
|
|
22
23
|
* @zcontext
|
|
23
24
|
**/
|
|
24
25
|
export declare class GestureContext extends Context<ConstructionProps> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Event, Observable, useCanvas } from '../index';
|
|
1
|
+
import { Context, Event, Observable, useCanvas, isDevelopmentBuild, isEditTime } from '../index';
|
|
2
2
|
/**
|
|
3
3
|
* Defines the modes for interpreting touch gestures.
|
|
4
4
|
*/
|
|
@@ -10,6 +10,7 @@ export var GestureMode;
|
|
|
10
10
|
})(GestureMode || (GestureMode = {}));
|
|
11
11
|
/**
|
|
12
12
|
* Manages touch gestures for scaling and rotating elements.
|
|
13
|
+
* @deprecated Use the GestureTransform component instead. This context will be removed in the next major version.
|
|
13
14
|
* @zcontext
|
|
14
15
|
**/
|
|
15
16
|
export class GestureContext extends Context {
|
|
@@ -98,6 +99,9 @@ export class GestureContext extends Context {
|
|
|
98
99
|
this.initialDistance = null;
|
|
99
100
|
this.initialAngle = null;
|
|
100
101
|
};
|
|
102
|
+
if (isDevelopmentBuild(contextManager) || isEditTime(contextManager)) {
|
|
103
|
+
console.warn('GestureContext is deprecated. Please use the GestureTransform component instead. GestureContext will be removed in the next major version.');
|
|
104
|
+
}
|
|
101
105
|
this.element = constructorProps.element ?? useCanvas(contextManager);
|
|
102
106
|
this.enabled.addListener(enabled => {
|
|
103
107
|
if (enabled) {
|