@plait/core 0.0.42 → 0.0.44
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/board/board.component.d.ts +19 -15
- package/constants/index.d.ts +1 -0
- package/core/element/element.component.d.ts +1 -2
- package/core/toolbar/toolbar.component.d.ts +3 -1
- package/esm2020/board/board.component.mjs +159 -104
- package/esm2020/constants/index.mjs +2 -1
- package/esm2020/core/element/element.component.mjs +1 -12
- package/esm2020/core/toolbar/toolbar.component.mjs +8 -1
- package/esm2020/interfaces/board.mjs +1 -1
- package/esm2020/interfaces/viewport.mjs +3 -3
- package/esm2020/plugins/create-board.mjs +10 -7
- package/esm2020/plugins/with-move.mjs +4 -11
- package/esm2020/utils/board.mjs +63 -13
- package/esm2020/utils/dom.mjs +1 -1
- package/fesm2015/plait-core.mjs +301 -191
- package/fesm2015/plait-core.mjs.map +1 -1
- package/fesm2020/plait-core.mjs +299 -201
- package/fesm2020/plait-core.mjs.map +1 -1
- package/interfaces/board.d.ts +2 -2
- package/interfaces/viewport.d.ts +2 -2
- package/package.json +1 -1
- package/plugins/create-board.d.ts +1 -1
- package/styles/styles.scss +6 -0
- package/utils/board.d.ts +8 -0
|
@@ -2,7 +2,7 @@ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges,
|
|
|
2
2
|
import { RoughSVG } from 'roughjs/bin/svg';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { BaseCursorStatus } from '../interfaces';
|
|
5
|
-
import { PlaitBoard, PlaitBoardChangeEvent } from '../interfaces/board';
|
|
5
|
+
import { PlaitBoard, PlaitBoardChangeEvent, PlaitBoardOptions } from '../interfaces/board';
|
|
6
6
|
import { PlaitElement } from '../interfaces/element';
|
|
7
7
|
import { PlaitPlugin } from '../interfaces/plugin';
|
|
8
8
|
import { Viewport } from '../interfaces/viewport';
|
|
@@ -10,36 +10,40 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export declare class PlaitBoardComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
11
11
|
cdr: ChangeDetectorRef;
|
|
12
12
|
private renderer2;
|
|
13
|
+
private elementRef;
|
|
13
14
|
hasInitialized: boolean;
|
|
14
|
-
get hostClass(): string;
|
|
15
15
|
board: PlaitBoard;
|
|
16
16
|
roughSVG: RoughSVG;
|
|
17
17
|
destroy$: Subject<any>;
|
|
18
|
-
|
|
19
|
-
toolbarTemplateRef: TemplateRef<any>;
|
|
20
|
-
private _viewZoom;
|
|
21
|
-
get viewZoom(): number;
|
|
18
|
+
autoFitPadding: number;
|
|
22
19
|
isMoving: boolean;
|
|
23
|
-
get isMoveMode(): boolean;
|
|
24
|
-
get host(): SVGElement;
|
|
25
|
-
get isFocused(): import("../interfaces").Selection | null;
|
|
26
20
|
plaitValue: PlaitElement[];
|
|
27
21
|
plaitViewport: Viewport;
|
|
28
22
|
plaitPlugins: PlaitPlugin[];
|
|
29
|
-
|
|
30
|
-
plaitAllowClearBoard: boolean;
|
|
23
|
+
plaitOptions: PlaitBoardOptions;
|
|
31
24
|
plaitChange: EventEmitter<PlaitBoardChangeEvent>;
|
|
32
25
|
plaitBoardInitialized: EventEmitter<PlaitBoard>;
|
|
26
|
+
get isMoveMode(): boolean;
|
|
27
|
+
get host(): SVGElement;
|
|
28
|
+
get isFocused(): import("../interfaces").Selection | null;
|
|
29
|
+
get hostClass(): string;
|
|
33
30
|
get readonly(): boolean;
|
|
34
31
|
get moving(): boolean;
|
|
35
32
|
get focused(): import("../interfaces").Selection | null;
|
|
36
|
-
|
|
33
|
+
svg: ElementRef;
|
|
34
|
+
toolbarTemplateRef: TemplateRef<any>;
|
|
35
|
+
contentContainer: ElementRef;
|
|
36
|
+
constructor(cdr: ChangeDetectorRef, renderer2: Renderer2, elementRef: ElementRef);
|
|
37
37
|
ngOnInit(): void;
|
|
38
38
|
ngOnChanges(changes: SimpleChanges): void;
|
|
39
39
|
ngAfterViewInit(): void;
|
|
40
40
|
initializePlugins(): void;
|
|
41
41
|
initializeEvents(): void;
|
|
42
|
-
|
|
42
|
+
initContainerSize(): void;
|
|
43
|
+
resizeViewport(): void;
|
|
44
|
+
setScroll(left: number, top: number): void;
|
|
45
|
+
getScrollOffset(left: number, top: number): void;
|
|
46
|
+
viewportChange(): void;
|
|
43
47
|
updateViewport(): void;
|
|
44
48
|
trackBy: (index: number, element: PlaitElement) => number;
|
|
45
49
|
changeMoveMode(cursorStatus: BaseCursorStatus): void;
|
|
@@ -47,9 +51,9 @@ export declare class PlaitBoardComponent implements OnInit, OnChanges, AfterView
|
|
|
47
51
|
zoomInHandle(): void;
|
|
48
52
|
zoomOutHandle(): void;
|
|
49
53
|
resetZoomHandel(): void;
|
|
50
|
-
|
|
54
|
+
setViewport(options: Partial<Viewport>): void;
|
|
51
55
|
ngOnDestroy(): void;
|
|
52
56
|
movingChange(isMoving: boolean): void;
|
|
53
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlaitBoardComponent, never>;
|
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PlaitBoardComponent, "plait-board", never, { "plaitValue": "plaitValue"; "plaitViewport": "plaitViewport"; "plaitPlugins": "plaitPlugins"; "
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlaitBoardComponent, "plait-board", never, { "plaitValue": "plaitValue"; "plaitViewport": "plaitViewport"; "plaitPlugins": "plaitPlugins"; "plaitOptions": "plaitOptions"; }, { "plaitChange": "plaitChange"; "plaitBoardInitialized": "plaitBoardInitialized"; }, ["toolbarTemplateRef"], ["*"]>;
|
|
55
59
|
}
|
package/constants/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { PlaitElement } from '../../interfaces/element';
|
|
3
2
|
import { PlaitBoard } from '../../interfaces/board';
|
|
3
|
+
import { PlaitElement } from '../../interfaces/element';
|
|
4
4
|
import { Selection } from '../../interfaces/selection';
|
|
5
5
|
import { Viewport } from '../../interfaces/viewport';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -18,7 +18,6 @@ export declare class PlaitElementComponent implements OnInit, OnChanges, OnDestr
|
|
|
18
18
|
constructor(renderer2: Renderer2, viewContainerRef: ViewContainerRef);
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
initialize(): void;
|
|
21
|
-
transform(first?: boolean): void;
|
|
22
21
|
drawElement(): void;
|
|
23
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
24
23
|
ngOnDestroy(): void;
|
|
@@ -2,9 +2,11 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { BaseCursorStatus, CursorStatus } from '../../interfaces';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class PlaitToolbarComponent {
|
|
5
|
+
_viewZoom: number;
|
|
5
6
|
hostClass: string;
|
|
6
7
|
cursorStatus: CursorStatus;
|
|
7
|
-
viewZoom: number;
|
|
8
|
+
set viewZoom(zoom: number);
|
|
9
|
+
get viewZoom(): number;
|
|
8
10
|
moveHandle: EventEmitter<BaseCursorStatus>;
|
|
9
11
|
adaptHandle: EventEmitter<any>;
|
|
10
12
|
zoomInHandle: EventEmitter<any>;
|