Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
* Allow to select multiple elements with `Selection` with touch when `CanvasApi.pointerMode` is `selection`;
* Allow to establish new links with `SelectionActionEstablishLink` on touchscreen;
* Allow to move link source or target with `LinkActionMoveEndpoint` on touchscreen;
* Make `ZoomOptions.requireCtrl` default to `false` to zoom without holding `Ctrl` i.e. like on a map.
* Enable `showPointerModeToggle` on `ZoomControl` by default (can be disabled by passing `false`).
- **[💥Breaking]** Extend and make optional built-in property editing form support:
* Extract property editor inputs into separate entry point `@reactodia/workspace/forms` to be able to use external forms implementation without always bundling the built-in one;
Expand Down
4 changes: 2 additions & 2 deletions src/diagram/canvasApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ export interface ZoomOptions {
* with the mouse wheel.
*
* If `true`, the mouse wheel will be used to scroll viewport
* horizontally or vertically if `Shift` is held;
* horizontally (or vertically if `Shift` is held);
* otherwise the wheel action will be inverted.
*
* @default true
* @default false
*/
requireCtrl?: boolean;
}
Expand Down
4 changes: 3 additions & 1 deletion src/diagram/canvasArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ class CanvasController implements CanvasApi {
return this.isEventFromCellLayer(e) && target instanceof Node && (
this.paper.root === target ||
this.paper.pane === target ||
this.paper.pane?.firstChild === target ||
(
!hasScrollableParent(target, this.linkLayer.current) &&
!hasScrollableParent(target, this.labelLayer.current) &&
Expand Down Expand Up @@ -512,6 +513,7 @@ class CanvasController implements CanvasApi {
return target instanceof Node && Boolean(
this.paper.root === target ||
this.paper.pane === target ||
this.paper.pane?.firstChild === target ||
this.linkLayer.current?.contains(target) ||
this.labelLayer.current?.contains(target) ||
this.elementLayer.current?.contains(target)
Expand Down Expand Up @@ -676,7 +678,7 @@ function zoomOptionsWithDefaults(zoomOptions: ZoomOptions = {}): Required<ZoomOp
maxFit: zoomOptions.maxFit ?? 1,
step: zoomOptions.step ?? 0.1,
fitPadding: zoomOptions.fitPadding ?? 20,
requireCtrl: zoomOptions.requireCtrl ?? true,
requireCtrl: zoomOptions.requireCtrl ?? false,
};
}

Expand Down
Loading