Skip to content

Commit

Permalink
fix(edgeless): hand mode in share page (#5401)
Browse files Browse the repository at this point in the history
  • Loading branch information
regischen authored Nov 22, 2023
1 parent 6bf81eb commit bee38b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ export class EdgelessPageBlockComponent extends BlockElement<

this._initViewport();

if (this.page.readonly) {
this.tools.setEdgelessTool({ type: 'pan', panning: true });
}

requestAnimationFrame(() => {
this._handleToolbarFlag();
this.requestUpdate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ export class EdgelessToolsManager {
editing: false,
}
) => {
if (this.page.readonly && edgelessTool.type !== 'pan') return;
if (this.edgelessTool === edgelessTool) return;
const lastType = this.edgelessTool.type;
this._controllers[lastType].beforeModeSwitch(edgelessTool);
Expand Down

1 comment on commit bee38b1

@vercel
Copy link

@vercel vercel bot commented on bee38b1 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blocksuite – ./packages/playground

blocksuite-git-master-toeverything.vercel.app
blocksuite-toeverything.vercel.app
blocksuite-five.vercel.app

Please sign in to comment.