cytoscape-canvas-underlay 1.2.2 → 1.2.3

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/README.md CHANGED
@@ -438,6 +438,12 @@ These still work but the `on()`/`off()` event emitter is preferred.
438
438
  | `visible` | `boolean` | `true` | Visibility |
439
439
  | `rotation` | `number` | `0` | Rotation in degrees (0, 90, 180, 270) |
440
440
 
441
+ ## Changelog
442
+
443
+ ### 1.2.3
444
+
445
+ - **Fix**: `_springBackIfNeeded` now respects `panClamp: false`. Previously, setting `panClamp: false` at runtime disabled hard clamping but the soft spring-back animation on mouse release still fired, snapping the viewport back to drawing bounds. This made it impossible to programmatically disable pan clamping (e.g., during `panToElement` animations).
446
+
441
447
  ## How it works
442
448
 
443
449
  1. A `<canvas>` element is inserted behind Cytoscape's graph canvas
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cytoscape-canvas-underlay",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Cytoscape.js plugin for rendering image/PDF canvas underlay behind graph nodes with synchronized zoom and pan",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -470,7 +470,7 @@ export class DrawingOverlay {
470
470
 
471
471
  /** Animate spring-back to boundary on mouse release (fixed-duration ease-out). */
472
472
  _springBackIfNeeded() {
473
- if (this._isUserDragging || this.opts.panClampMode !== 'soft') return;
473
+ if (this._isUserDragging || !this.opts.panClamp || this.opts.panClampMode !== 'soft') return;
474
474
  this._cancelSpringBack();
475
475
 
476
476
  const b = this._getPanBounds();