@meta2d/core 1.0.51 → 1.0.53

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": "@meta2d/core",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import { Pen, IValue } from '../pen';
2
2
  import { Point } from '../point';
3
3
  import { Rect } from '../rect';
4
- import { EditAction, Meta2dStore } from '../store';
4
+ import { EditAction, Fit, Meta2dStore } from '../store';
5
5
  import { Padding } from '../utils';
6
6
  import { HotkeyType, HoverType, MouseRight } from '../data';
7
7
  import { curve, mind, lineSegment } from '../diagrams';
@@ -65,6 +65,7 @@ export declare class Canvas {
65
65
  nextAnchor: Point;
66
66
  private lastMouseTime;
67
67
  private hoverTimer;
68
+ private fitTimer;
68
69
  private willInactivePen;
69
70
  patchFlags: boolean;
70
71
  lastRender: number;
@@ -432,8 +433,8 @@ export declare class Canvas {
432
433
  height: number;
433
434
  };
434
435
  toPng(padding?: Padding, callback?: BlobCallback, containBkImg?: boolean, maxWidth?: number): string;
435
- activeToPng(padding?: Padding): string;
436
- pensToPng(pens?: Pen[], padding?: Padding): string;
436
+ activeToPng(padding?: Padding, maxWidth?: number): string;
437
+ pensToPng(pens?: Pen[], padding?: Padding, maxWidth?: number): string;
437
438
  toggleAnchorMode(): void;
438
439
  addAnchorHand(): void;
439
440
  removeAnchorHand(): void;
@@ -441,6 +442,14 @@ export declare class Canvas {
441
442
  gotoView(x: number, y: number): void;
442
443
  showMagnifier(): void;
443
444
  hideMagnifier(): void;
445
+ private inFitBorder;
446
+ showFit(): void;
447
+ hideFit(): void;
448
+ makeFit(): void;
449
+ updateFit(e: any): void;
450
+ updateFitRect(fit?: Fit): void;
451
+ deleteFit(fit?: Fit): void;
452
+ calcuActiveFit(): void;
444
453
  toggleMagnifier(): void;
445
454
  destroy(): void;
446
455
  }