@netless/app-slide 0.2.96-alpha.0 → 0.2.96-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/app-slide",
3
- "version": "0.2.96-alpha.0",
3
+ "version": "0.2.96-alpha.2",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -60,6 +60,7 @@ export class ResizableContainer {
60
60
  this.updateResizableContainer();
61
61
  });
62
62
  this.resizeObserver.observe(this.scrollContainer);
63
+
63
64
  }
64
65
 
65
66
  public getTranslate(): { x: number; y: number } {
@@ -164,7 +165,7 @@ export class ResizableContainer {
164
165
  if (options.triggerScrollBar) {
165
166
  this.scrollBar?.handleNormalizeTranslate(x, y);
166
167
  }
167
- if (options.triggerSync) {
168
+ if (options.triggerSync && this.enableResize && this.context.getIsWritable()) {
168
169
  this.context.storage.setState({ translateX: this.translateX, translateY: this.translateY });
169
170
  }
170
171
  }