diff --git a/packages/g-mobile-svg/CHANGELOG.md b/packages/g-mobile-svg/CHANGELOG.md index c2521c664..8a627a83b 100644 --- a/packages/g-mobile-svg/CHANGELOG.md +++ b/packages/g-mobile-svg/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-mobile-svg +## 0.10.16 + +### Patch Changes + +- ef3ef11b: Use gesture plugin in mobile SVG & WebGL renderers. + ## 0.10.15 ### Patch Changes diff --git a/packages/g-mobile-svg/package.json b/packages/g-mobile-svg/package.json index c5bd3d68b..d2680396d 100644 --- a/packages/g-mobile-svg/package.json +++ b/packages/g-mobile-svg/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-svg", - "version": "0.10.15", + "version": "0.10.16", "description": "A renderer implemented by SVG in mobile environment", "keywords": [ "antv", @@ -40,6 +40,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/g-plugin-dragndrop": "workspace:*", + "@antv/g-plugin-gesture": "workspace:*", "@antv/g-plugin-mobile-interaction": "workspace:*", "@antv/g-plugin-svg-picker": "workspace:*", "@antv/g-plugin-svg-renderer": "workspace:*", diff --git a/packages/g-mobile-svg/src/index.ts b/packages/g-mobile-svg/src/index.ts index 1d7e0c773..6adbb81fa 100644 --- a/packages/g-mobile-svg/src/index.ts +++ b/packages/g-mobile-svg/src/index.ts @@ -4,6 +4,7 @@ import * as DragDropEvent from '@antv/g-plugin-dragndrop'; import * as MobileInteraction from '@antv/g-plugin-mobile-interaction'; import * as SVGPicker from '@antv/g-plugin-svg-picker'; import * as SVGRenderer from '@antv/g-plugin-svg-renderer'; +import * as GesturePlugin from '@antv/g-plugin-gesture'; import { isNil } from '@antv/util'; import { ContextRegisterPlugin } from './ContextRegisterPlugin'; @@ -27,8 +28,12 @@ export class Renderer extends AbstractRenderer { this.registerPlugin(new SVGPicker.Plugin()); this.registerPlugin( new DragDropEvent.Plugin({ - isDocumentDraggable: isNil(config?.isDocumentDraggable) ? true : config.isDocumentDraggable, - isDocumentDroppable: isNil(config?.isDocumentDroppable) ? true : config.isDocumentDroppable, + isDocumentDraggable: isNil(config?.isDocumentDraggable) + ? true + : config.isDocumentDraggable, + isDocumentDroppable: isNil(config?.isDocumentDroppable) + ? true + : config.isDocumentDroppable, dragstartDistanceThreshold: isNil(config?.dragstartDistanceThreshold) ? 10 : config.dragstartDistanceThreshold, @@ -37,5 +42,11 @@ export class Renderer extends AbstractRenderer { : config.dragstartTimeThreshold, }), ); + + this.registerPlugin( + new GesturePlugin.Plugin({ + isDocumentGestureEnabled: true, + }), + ); } } diff --git a/packages/g-mobile-webgl/CHANGELOG.md b/packages/g-mobile-webgl/CHANGELOG.md index caaaefa8f..71f13bfd8 100644 --- a/packages/g-mobile-webgl/CHANGELOG.md +++ b/packages/g-mobile-webgl/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-mobile-webgl +## 0.9.23 + +### Patch Changes + +- ef3ef11b: Use gesture plugin in mobile SVG & WebGL renderers. + ## 0.9.22 ### Patch Changes diff --git a/packages/g-mobile-webgl/package.json b/packages/g-mobile-webgl/package.json index fddf7b0f4..b34268b2c 100644 --- a/packages/g-mobile-webgl/package.json +++ b/packages/g-mobile-webgl/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-webgl", - "version": "0.9.22", + "version": "0.9.23", "description": "A renderer implemented by WebGL1/2 in mobile environment", "keywords": [ "antv", @@ -41,6 +41,7 @@ "@antv/g-lite": "workspace:*", "@antv/g-plugin-device-renderer": "workspace:*", "@antv/g-plugin-dragndrop": "workspace:*", + "@antv/g-plugin-gesture": "workspace:*", "@antv/g-plugin-html-renderer": "workspace:*", "@antv/g-plugin-image-loader": "workspace:*", "@antv/g-plugin-mobile-interaction": "workspace:*", diff --git a/packages/g-mobile-webgl/src/index.ts b/packages/g-mobile-webgl/src/index.ts index b68a4c27e..9f93e6b00 100644 --- a/packages/g-mobile-webgl/src/index.ts +++ b/packages/g-mobile-webgl/src/index.ts @@ -5,6 +5,7 @@ import * as DragDropEvent from '@antv/g-plugin-dragndrop'; import * as HTMLRenderer from '@antv/g-plugin-html-renderer'; import * as ImageLoader from '@antv/g-plugin-image-loader'; import * as DomInteraction from '@antv/g-plugin-mobile-interaction'; +import * as GesturePlugin from '@antv/g-plugin-gesture'; import { isNil } from '@antv/util'; import { ContextRegisterPlugin } from './ContextRegisterPlugin'; @@ -52,5 +53,11 @@ export class Renderer extends AbstractRenderer { : config.dragstartTimeThreshold, }), ); + + this.registerPlugin( + new GesturePlugin.Plugin({ + isDocumentGestureEnabled: true, + }), + ); } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2938e3a16..f9cc5d2ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + overrides: jest-environment-jsdom: ^26.6.2 @@ -424,6 +428,9 @@ importers: '@antv/g-plugin-dragndrop': specifier: workspace:* version: link:../g-plugin-dragndrop + '@antv/g-plugin-gesture': + specifier: workspace:* + version: link:../g-plugin-gesture '@antv/g-plugin-mobile-interaction': specifier: workspace:* version: link:../g-plugin-mobile-interaction @@ -458,6 +465,9 @@ importers: '@antv/g-plugin-dragndrop': specifier: workspace:* version: link:../g-plugin-dragndrop + '@antv/g-plugin-gesture': + specifier: workspace:* + version: link:../g-plugin-gesture '@antv/g-plugin-html-renderer': specifier: workspace:* version: link:../g-plugin-html-renderer @@ -8048,6 +8058,7 @@ packages: /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + requiresBuild: true dev: true optional: true @@ -8896,6 +8907,7 @@ packages: /config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + requiresBuild: true dependencies: ini: 1.3.8 proto-list: 1.2.4 @@ -10519,6 +10531,7 @@ packages: /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + requiresBuild: true dev: true optional: true @@ -10757,6 +10770,7 @@ packages: /es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + requiresBuild: true dev: true optional: true @@ -12655,6 +12669,7 @@ packages: /growly@1.3.0: resolution: {integrity: sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==} + requiresBuild: true dev: true optional: true @@ -15912,6 +15927,7 @@ packages: /matcher@3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} engines: {node: '>=10'} + requiresBuild: true dependencies: escape-string-regexp: 4.0.0 dev: true @@ -17168,6 +17184,7 @@ packages: /npm-conf@1.1.3: resolution: {integrity: sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==} engines: {node: '>=4'} + requiresBuild: true dependencies: config-chain: 1.1.13 pify: 3.0.0 @@ -19009,6 +19026,7 @@ packages: /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + requiresBuild: true dev: true optional: true @@ -19020,6 +19038,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true @@ -20726,6 +20745,7 @@ packages: /roarr@2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} + requiresBuild: true dependencies: boolean: 3.2.0 detect-node: 2.1.0 @@ -21077,6 +21097,7 @@ packages: /serialize-error@7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} + requiresBuild: true dependencies: type-fest: 0.13.1 dev: true @@ -21174,6 +21195,7 @@ packages: /shellwords@0.1.1: resolution: {integrity: sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==} + requiresBuild: true dev: true optional: true @@ -21563,6 +21585,7 @@ packages: /sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + requiresBuild: true dev: true optional: true @@ -22680,6 +22703,7 @@ packages: /tunnel@0.0.6: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + requiresBuild: true dev: true optional: true