init preferred tool based on device

This commit is contained in:
Ryan Di
2025-10-03 17:05:01 +10:00
parent 8a80805355
commit bb8e48621b
13 changed files with 581 additions and 161 deletions

View File

@@ -122,7 +122,10 @@ export const actionClearCanvas = register({
pasteDialog: appState.pasteDialog,
activeTool:
appState.activeTool.type === "image"
? { ...appState.activeTool, type: app.state.preferredSelectionTool }
? {
...appState.activeTool,
type: app.state.preferredSelectionTool.type,
}
: appState.activeTool,
},
captureUpdate: CaptureUpdateAction.IMMEDIATELY,
@@ -501,7 +504,7 @@ export const actionToggleEraserTool = register({
if (isEraserActive(appState)) {
activeTool = updateActiveTool(appState, {
...(appState.activeTool.lastActiveTool || {
type: app.state.preferredSelectionTool,
type: app.state.preferredSelectionTool.type,
}),
lastActiveToolBeforeEraser: null,
});
@@ -532,7 +535,7 @@ export const actionToggleLassoTool = register({
icon: LassoIcon,
trackEvent: { category: "toolbar" },
predicate: (elements, appState, props, app) => {
return app.state.preferredSelectionTool !== "lasso";
return app.state.preferredSelectionTool.type !== "lasso";
},
perform: (elements, appState, _, app) => {
let activeTool: AppState["activeTool"];

View File

@@ -303,7 +303,7 @@ export const actionDeleteSelected = register({
appState: {
...nextAppState,
activeTool: updateActiveTool(appState, {
type: app.state.preferredSelectionTool,
type: app.state.preferredSelectionTool.type,
}),
multiElement: null,
activeEmbeddable: null,

View File

@@ -261,13 +261,13 @@ export const actionFinalize = register({
if (appState.activeTool.type === "eraser") {
activeTool = updateActiveTool(appState, {
...(appState.activeTool.lastActiveTool || {
type: app.state.preferredSelectionTool,
type: app.state.preferredSelectionTool.type,
}),
lastActiveToolBeforeEraser: null,
});
} else {
activeTool = updateActiveTool(appState, {
type: app.state.preferredSelectionTool,
type: app.state.preferredSelectionTool.type,
});
}

View File

@@ -55,7 +55,10 @@ export const getDefaultAppState = (): Omit<
fromSelection: false,
lastActiveTool: null,
},
preferredSelectionTool: "selection",
preferredSelectionTool: {
type: "selection",
initialized: false,
},
penMode: false,
penDetected: false,
errorMessage: null,

View File

@@ -1063,7 +1063,7 @@ export const ShapesSwitcher = ({
const lassoToolSelected =
app.state.stylesPanelMode === "full" &&
activeTool.type === "lasso" &&
app.state.preferredSelectionTool !== "lasso";
app.state.preferredSelectionTool.type !== "lasso";
const embeddableToolSelected = activeTool.type === "embeddable";
@@ -1102,7 +1102,7 @@ export const ShapesSwitcher = ({
app={app}
options={SELECTION_TOOLS}
activeTool={activeTool}
defaultOption={app.state.preferredSelectionTool}
defaultOption={app.state.preferredSelectionTool.type}
namePrefix="selectionType"
title={capitalizeString(t("toolBar.selection"))}
data-testid="toolbar-selection"
@@ -1110,13 +1110,14 @@ export const ShapesSwitcher = ({
if (type === "selection" || type === "lasso") {
app.setActiveTool({ type });
setAppState({
preferredSelectionTool: type,
preferredSelectionTool: { type, initialized: true },
});
}
}}
displayedOption={
SELECTION_TOOLS.find(
(tool) => tool.type === app.state.preferredSelectionTool,
(tool) =>
tool.type === app.state.preferredSelectionTool.type,
) || SELECTION_TOOLS[0]
}
fillable={activeTool.type === "selection"}

View File

@@ -1616,7 +1616,7 @@ class App extends React.Component<AppProps, AppState> {
!this.state.isLoading &&
this.state.showWelcomeScreen &&
this.state.activeTool.type ===
this.state.preferredSelectionTool &&
this.state.preferredSelectionTool.type &&
!this.state.zenModeEnabled &&
!this.scene.getElementsIncludingDeleted().length
}
@@ -2361,6 +2361,14 @@ class App extends React.Component<AppProps, AppState> {
deleteInvisibleElements: true,
});
const activeTool = scene.appState.activeTool;
if (!scene.appState.preferredSelectionTool.initialized) {
scene.appState.preferredSelectionTool = {
type: this.device.editor.isMobile ? "lasso" : "selection",
initialized: true,
};
}
scene.appState = {
...scene.appState,
theme: this.props.theme || scene.appState.theme,
@@ -2375,7 +2383,7 @@ class App extends React.Component<AppProps, AppState> {
activeTool.type === "selection"
? {
...activeTool,
type: scene.appState.preferredSelectionTool,
type: scene.appState.preferredSelectionTool.type,
}
: scene.appState.activeTool,
isLoading: false,
@@ -3281,7 +3289,10 @@ class App extends React.Component<AppProps, AppState> {
await this.insertClipboardContent(data, filesList, isPlainPaste);
this.setActiveTool({ type: this.state.preferredSelectionTool }, true);
this.setActiveTool(
{ type: this.state.preferredSelectionTool.type },
true,
);
event?.preventDefault();
},
);
@@ -3427,7 +3438,7 @@ class App extends React.Component<AppProps, AppState> {
}
},
);
this.setActiveTool({ type: this.state.preferredSelectionTool }, true);
this.setActiveTool({ type: this.state.preferredSelectionTool.type }, true);
if (opts.fitToContent) {
this.scrollToContent(duplicatedElements, {
@@ -3639,7 +3650,7 @@ class App extends React.Component<AppProps, AppState> {
...updateActiveTool(
this.state,
prevState.activeTool.locked
? { type: this.state.preferredSelectionTool }
? { type: this.state.preferredSelectionTool.type }
: prevState.activeTool,
),
locked: !prevState.activeTool.locked,
@@ -4650,7 +4661,7 @@ class App extends React.Component<AppProps, AppState> {
if (event.key === KEYS.K && !event.altKey && !event[KEYS.CTRL_OR_CMD]) {
if (this.state.activeTool.type === "laser") {
this.setActiveTool({ type: this.state.preferredSelectionTool });
this.setActiveTool({ type: this.state.preferredSelectionTool.type });
} else {
this.setActiveTool({ type: "laser" });
}
@@ -5495,7 +5506,7 @@ class App extends React.Component<AppProps, AppState> {
return;
}
// we should only be able to double click when mode is selection
if (this.state.activeTool.type !== this.state.preferredSelectionTool) {
if (this.state.activeTool.type !== this.state.preferredSelectionTool.type) {
return;
}
@@ -7686,7 +7697,7 @@ class App extends React.Component<AppProps, AppState> {
if (!this.state.activeTool.locked) {
this.setState({
activeTool: updateActiveTool(this.state, {
type: this.state.preferredSelectionTool,
type: this.state.preferredSelectionTool.type,
}),
});
}
@@ -9400,7 +9411,7 @@ class App extends React.Component<AppProps, AppState> {
this.setState((prevState) => ({
newElement: null,
activeTool: updateActiveTool(this.state, {
type: this.state.preferredSelectionTool,
type: this.state.preferredSelectionTool.type,
}),
selectedElementIds: makeNextSelectedElementIds(
{
@@ -10017,7 +10028,7 @@ class App extends React.Component<AppProps, AppState> {
newElement: null,
suggestedBindings: [],
activeTool: updateActiveTool(this.state, {
type: this.state.preferredSelectionTool,
type: this.state.preferredSelectionTool.type,
}),
});
} else {
@@ -10247,7 +10258,7 @@ class App extends React.Component<AppProps, AppState> {
{
newElement: null,
activeTool: updateActiveTool(this.state, {
type: this.state.preferredSelectionTool,
type: this.state.preferredSelectionTool.type,
}),
},
() => {
@@ -10680,7 +10691,7 @@ class App extends React.Component<AppProps, AppState> {
event.nativeEvent.pointerType === "pen" &&
// always allow if user uses a pen secondary button
event.button !== POINTER_BUTTON.SECONDARY)) &&
this.state.activeTool.type !== this.state.preferredSelectionTool
this.state.activeTool.type !== this.state.preferredSelectionTool.type
) {
return;
}

View File

@@ -202,7 +202,7 @@ export const MobileToolBar = ({
app={app}
options={SELECTION_TOOLS}
activeTool={activeTool}
defaultOption={app.state.preferredSelectionTool}
defaultOption={app.state.preferredSelectionTool.type}
namePrefix="selectionType"
title={capitalizeString(t("toolBar.selection"))}
data-testid="toolbar-selection"
@@ -210,13 +210,13 @@ export const MobileToolBar = ({
if (type === "selection" || type === "lasso") {
app.setActiveTool({ type });
setAppState({
preferredSelectionTool: type,
preferredSelectionTool: { type, initialized: true },
});
}
}}
displayedOption={
SELECTION_TOOLS.find(
(tool) => tool.type === app.state.preferredSelectionTool,
(tool) => tool.type === app.state.preferredSelectionTool.type,
) || SELECTION_TOOLS[0]
}
/>

View File

@@ -89,7 +89,7 @@ export const SHAPES = [
] as const;
export const getToolbarTools = (app: AppClassProperties) => {
return app.state.preferredSelectionTool === "lasso"
return app.state.preferredSelectionTool.type === "lasso"
? ([
{
value: "lasso",

View File

@@ -956,7 +956,10 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1152,7 +1155,10 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1366,7 +1372,10 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1697,7 +1706,10 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2028,7 +2040,10 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2242,7 +2257,10 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2483,7 +2501,10 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2781,7 +2802,10 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
},
@@ -3153,7 +3177,10 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3646,7 +3673,10 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3969,7 +3999,10 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4292,7 +4325,10 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
},
@@ -5577,7 +5613,10 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -6794,7 +6833,10 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -7732,7 +7774,10 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8729,7 +8774,10 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9723,7 +9771,10 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,

View File

@@ -78,7 +78,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id4": true,
},
@@ -694,7 +697,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id4": true,
},
@@ -1183,7 +1189,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1547,7 +1556,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1914,7 +1926,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2174,7 +2189,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2619,7 +2637,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2922,7 +2943,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3241,7 +3265,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3535,7 +3562,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3821,7 +3851,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4056,7 +4089,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4313,7 +4349,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4584,7 +4623,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4813,7 +4855,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -5042,7 +5087,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -5289,7 +5337,10 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -5545,7 +5596,10 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -5800,7 +5854,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id1": true,
},
@@ -6129,7 +6186,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id8": true,
},
@@ -6556,7 +6616,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id1": true,
},
@@ -6933,7 +6996,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -7242,7 +7308,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -7558,7 +7627,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -7788,7 +7860,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8140,7 +8215,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8492,7 +8570,10 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -8898,7 +8979,10 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9185,7 +9269,10 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9449,7 +9536,10 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9714,7 +9804,10 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9949,7 +10042,10 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10243,7 +10339,10 @@ exports[`history > multiplayer undo/redo > should override remotely added points
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10592,7 +10691,10 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10831,7 +10933,10 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -11276,7 +11381,10 @@ exports[`history > multiplayer undo/redo > should update history entries after r
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -11536,7 +11644,10 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -11771,7 +11882,10 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -12008,7 +12122,10 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -12414,7 +12531,10 @@ exports[`history > singleplayer undo/redo > should create new history entry on e
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -12621,7 +12741,10 @@ exports[`history > singleplayer undo/redo > should create new history entry on e
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -12831,7 +12954,10 @@ exports[`history > singleplayer undo/redo > should create new history entry on i
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -13129,7 +13255,10 @@ exports[`history > singleplayer undo/redo > should create new history entry on i
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -13430,7 +13559,10 @@ exports[`history > singleplayer undo/redo > should create new history entry on s
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": -50,
@@ -13672,7 +13804,10 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -13909,7 +14044,10 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -14146,7 +14284,10 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -14393,7 +14534,10 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -14727,7 +14871,10 @@ exports[`history > singleplayer undo/redo > should not collapse when applying co
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -14894,7 +15041,10 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -15181,7 +15331,10 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -15444,7 +15597,10 @@ exports[`history > singleplayer undo/redo > should not modify anything on unrela
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -15594,7 +15750,10 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -15879,7 +16038,10 @@ exports[`history > singleplayer undo/redo > should support appstate name or view
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -16038,7 +16200,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -16743,7 +16908,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -17378,7 +17546,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -18013,7 +18184,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -18732,7 +18906,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -19483,7 +19660,10 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -19963,7 +20143,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id1": true,
},
@@ -20474,7 +20657,10 @@ exports[`history > singleplayer undo/redo > should support element creation, del
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
},
@@ -20933,7 +21119,10 @@ exports[`history > singleplayer undo/redo > should support linear element creati
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},

View File

@@ -79,7 +79,10 @@ exports[`given element A and group of elements B and given both are selected whe
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -505,7 +508,10 @@ exports[`given element A and group of elements B and given both are selected whe
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -921,7 +927,10 @@ exports[`regression tests > Cmd/Ctrl-click exclusively select element under poin
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1487,7 +1496,10 @@ exports[`regression tests > Drags selected element when hitting only bounding bo
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -1694,7 +1706,10 @@ exports[`regression tests > adjusts z order when grouping > [end of test] appSta
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -2078,7 +2093,10 @@ exports[`regression tests > alt-drag duplicates an element > [end of test] appSt
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -2323,7 +2341,10 @@ exports[`regression tests > arrow keys > [end of test] appState 1`] = `
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -2503,7 +2524,10 @@ exports[`regression tests > can drag element that covers another element, while
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id6": true,
},
@@ -2828,7 +2852,10 @@ exports[`regression tests > change the properties of a shape > [end of test] app
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -3083,7 +3110,10 @@ exports[`regression tests > click on an element and drag it > [dragged] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -3324,7 +3354,10 @@ exports[`regression tests > click on an element and drag it > [end of test] appS
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -3560,7 +3593,10 @@ exports[`regression tests > click to select a shape > [end of test] appState 1`]
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
},
@@ -3818,7 +3854,10 @@ exports[`regression tests > click-drag to select a group > [end of test] appStat
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id6": true,
},
@@ -4132,7 +4171,10 @@ exports[`regression tests > deleting last but one element in editing group shoul
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -4568,7 +4610,10 @@ exports[`regression tests > deselects group of selected elements on pointer down
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -4851,7 +4896,10 @@ exports[`regression tests > deselects group of selected elements on pointer up w
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -5127,7 +5175,10 @@ exports[`regression tests > deselects selected element on pointer down when poin
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -5335,7 +5386,10 @@ exports[`regression tests > deselects selected element, on pointer up, when clic
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -5535,7 +5589,10 @@ exports[`regression tests > double click to edit a group > [end of test] appStat
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -5928,7 +5985,10 @@ exports[`regression tests > drags selected elements from point inside common bou
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -6225,7 +6285,10 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1`
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -7081,7 +7144,10 @@ exports[`regression tests > given a group of selected elements with an element t
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id6": true,
@@ -7415,7 +7481,10 @@ exports[`regression tests > given a selected element A and a not selected elemen
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -7694,7 +7763,10 @@ exports[`regression tests > given selected element A with lower z-index than uns
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -7929,7 +8001,10 @@ exports[`regression tests > given selected element A with lower z-index than uns
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -8169,7 +8244,10 @@ exports[`regression tests > key 2 selects rectangle tool > [end of test] appStat
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8349,7 +8427,10 @@ exports[`regression tests > key 3 selects diamond tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8529,7 +8610,10 @@ exports[`regression tests > key 4 selects ellipse tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8709,7 +8793,10 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -8939,7 +9026,10 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`]
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9167,7 +9257,10 @@ exports[`regression tests > key 7 selects freedraw tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9363,7 +9456,10 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1`
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9593,7 +9689,10 @@ exports[`regression tests > key d selects diamond tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -9773,7 +9872,10 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`]
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10001,7 +10103,10 @@ exports[`regression tests > key o selects ellipse tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10181,7 +10286,10 @@ exports[`regression tests > key p selects freedraw tool > [end of test] appState
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10377,7 +10485,10 @@ exports[`regression tests > key r selects rectangle tool > [end of test] appStat
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -10557,7 +10668,10 @@ exports[`regression tests > make a group and duplicate it > [end of test] appSta
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -11088,7 +11202,10 @@ exports[`regression tests > noop interaction after undo shouldn't create history
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -11368,7 +11485,10 @@ exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = `
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": "-6.25000",
@@ -11491,7 +11611,10 @@ exports[`regression tests > shift click on selected element should deselect it o
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -11691,7 +11814,10 @@ exports[`regression tests > shift-click to multiselect, then drag > [end of test
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -12010,7 +12136,10 @@ exports[`regression tests > should group elements and ungroup them > [end of tes
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id3": true,
@@ -12439,7 +12568,10 @@ exports[`regression tests > single-clicking on a subgroup of a selected group sh
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
"id15": true,
@@ -13082,7 +13214,10 @@ exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] a
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 60,
@@ -13205,7 +13340,10 @@ exports[`regression tests > supports nested groups > [end of test] appState 1`]
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id0": true,
},
@@ -13836,7 +13974,10 @@ exports[`regression tests > switches from group of selected elements to another
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
"id6": true,
@@ -14175,7 +14316,10 @@ exports[`regression tests > switches selected element on pointer down > [end of
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {
"id3": true,
},
@@ -14439,7 +14583,10 @@ exports[`regression tests > two-finger scroll works > [end of test] appState 1`]
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 20,
@@ -14562,7 +14709,10 @@ exports[`regression tests > undo/redo drawing an element > [end of test] appStat
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -14954,7 +15104,10 @@ exports[`regression tests > updates fontSize & fontFamily appState > [end of tes
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,
@@ -15080,7 +15233,10 @@ exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = `
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": true,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,

View File

@@ -316,7 +316,10 @@ export interface AppState {
// indicates if the current tool is temporarily switched on from the selection tool
fromSelection: boolean;
} & ActiveTool;
preferredSelectionTool: "selection" | "lasso";
preferredSelectionTool: {
type: "selection" | "lasso";
initialized: boolean;
};
penMode: boolean;
penDetected: boolean;
exportBackground: boolean;

View File

@@ -80,7 +80,10 @@ exports[`exportToSvg > with default arguments 1`] = `
},
"penDetected": false,
"penMode": false,
"preferredSelectionTool": "selection",
"preferredSelectionTool": {
"initialized": false,
"type": "selection",
},
"previousSelectedElementIds": {},
"resizingElement": null,
"scrollX": 0,