aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-12 23:43:55 -0500
committerbobzel <zzzman@gmail.com>2020-12-12 23:43:55 -0500
commit84849091ceaec757e545ab5ea69cd9d6ff46f6d2 (patch)
treef012b7c1c4bb6f1c8c4ab3431daf9d9463434903 /src
parent9ca004669a7882123277eb46cad8e86b28305266 (diff)
fixed resetting bookmark view to not set _currentFrame to 0 unless it already had a value.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionMenu.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index ef0c30ff4..833fc0007 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -177,7 +177,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionMenuProp
_viewCommand = {
params: ["target"], title: "bookmark view",
script: "self.target._panX = self['target-panX']; self.target._panY = self['target-panY']; self.target._viewScale = self['target-viewScale']; gotoFrame(self.target, self['target-currentFrame']);",
- immediate: undoBatch((source: Doc[]) => { this.target._panX = 0; this.target._panY = 0; this.target._viewScale = 1; this.target._currentFrame = 0; }),
+ immediate: undoBatch((source: Doc[]) => { this.target._panX = 0; this.target._panY = 0; this.target._viewScale = 1; this.target._currentFrame = (this.target._currentFrame === undefined ? undefined : 0); }),
initialize: (button: Doc) => { button['target-panX'] = this.target._panX; button['target-panY'] = this.target._panY; button['target-viewScale'] = this.target._viewScale; button['target-currentFrame'] = this.target._currentFrame; },
};
_clusterCommand = {