@metadev/daga 4.2.1 → 4.2.2
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.
- package/Changelog.md +4 -0
- package/index.cjs.js +4 -1
- package/index.esm.js +4 -1
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -6,6 +6,10 @@ List of releases and changes.
|
|
|
6
6
|
|
|
7
7
|
## Next release Joyeuse
|
|
8
8
|
|
|
9
|
+
## v. 4.2.2
|
|
10
|
+
|
|
11
|
+
- Fix zoom on double-click [PR 307](https://github.com/metadevpro/daga/pull/307)
|
|
12
|
+
|
|
9
13
|
## v. 4.2.1
|
|
10
14
|
|
|
11
15
|
- Apply zoom when scrolling over diagram elements [#278](https://github.com/metadevpro/daga/issues/278) [#290](https://github.com/metadevpro/daga/pull/290)
|
package/index.cjs.js
CHANGED
|
@@ -7190,7 +7190,10 @@ class DiagramCanvas {
|
|
|
7190
7190
|
}
|
|
7191
7191
|
});
|
|
7192
7192
|
const canvasView = this.selectSVGElement().append('g').attr('class', 'daga-canvas-view').attr('width', `100%`).attr('height', `100%`);
|
|
7193
|
-
canvasView.call(this.zoomBehavior = d3__namespace.zoom().
|
|
7193
|
+
canvasView.call(this.zoomBehavior = d3__namespace.zoom().filter(event => {
|
|
7194
|
+
// Disable double-click zoom by filtering out dblclick events
|
|
7195
|
+
return event.type !== exports.Events.DoubleClick;
|
|
7196
|
+
}).on(exports.ZoomEvents.Zoom, event => {
|
|
7194
7197
|
if (event.sourceEvent) {
|
|
7195
7198
|
// zoom event was triggered by user
|
|
7196
7199
|
if (!this.canUserPerformAction(exports.DiagramActions.Zoom)) {
|
package/index.esm.js
CHANGED
|
@@ -7169,7 +7169,10 @@ class DiagramCanvas {
|
|
|
7169
7169
|
}
|
|
7170
7170
|
});
|
|
7171
7171
|
const canvasView = this.selectSVGElement().append('g').attr('class', 'daga-canvas-view').attr('width', `100%`).attr('height', `100%`);
|
|
7172
|
-
canvasView.call(this.zoomBehavior = d3.zoom().
|
|
7172
|
+
canvasView.call(this.zoomBehavior = d3.zoom().filter(event => {
|
|
7173
|
+
// Disable double-click zoom by filtering out dblclick events
|
|
7174
|
+
return event.type !== Events.DoubleClick;
|
|
7175
|
+
}).on(ZoomEvents.Zoom, event => {
|
|
7173
7176
|
if (event.sourceEvent) {
|
|
7174
7177
|
// zoom event was triggered by user
|
|
7175
7178
|
if (!this.canUserPerformAction(DiagramActions.Zoom)) {
|