@trebco/treb 31.3.4 → 31.4.0

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/dist/treb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! API v31.3. Copyright 2018-2024 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
1
+ /*! API v31.4. Copyright 2018-2024 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
2
2
 
3
3
  /**
4
4
  * add our tag to the map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebco/treb",
3
- "version": "31.3.4",
3
+ "version": "31.4.0",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "homepage": "https://treb.app",
6
6
  "repository": {
@@ -1474,6 +1474,18 @@ export class Grid extends GridBase {
1474
1474
 
1475
1475
  }
1476
1476
 
1477
+ /** set scale directly */
1478
+ public SetScale(scale: number) {
1479
+ scale = Math.round(scale * 1000) / 1000;
1480
+ scale = Math.min(2, Math.max(scale, .5));
1481
+
1482
+ if (this.options.persist_scale_key) {
1483
+ localStorage.setItem(this.options.persist_scale_key, JSON.stringify({scale}));
1484
+ }
1485
+
1486
+ this.scale = scale;
1487
+ }
1488
+
1477
1489
  /**
1478
1490
  * @param container html container element
1479
1491
  */
@@ -5399,7 +5411,7 @@ export class Grid extends GridBase {
5399
5411
  */
5400
5412
  private SetInferredType(selection: GridSelection, value: string|undefined, array = false, exec = true, apply_style?: CellStyle) {
5401
5413
 
5402
- console.info("SIT", {apply_style});
5414
+ // console.info("SIT", {apply_style});
5403
5415
 
5404
5416
  // validation: cannot change part of an array without changing the
5405
5417
  // whole array. so check the array. separately, if you are entering