@plait/core 0.1.4 → 0.1.6

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.
@@ -36,7 +36,7 @@ export interface PlaitBoard {
36
36
  drawElement: (context: PlaitPluginElementContext) => SVGGElement[] | ComponentType<PlaitPluginElementComponent>;
37
37
  redrawElement: (context: PlaitPluginElementContext, previousContext?: PlaitPluginElementContext) => SVGGElement[] | void;
38
38
  destroyElement: (context: PlaitPluginElementContext) => void;
39
- isIntersectionSelection: (element: PlaitElement, range: Range) => boolean;
39
+ isHitSelection: (element: PlaitElement, range: Range) => boolean;
40
40
  isMovable: (element: PlaitElement) => boolean;
41
41
  getRectangle: (element: PlaitElement) => RectangleClient | null;
42
42
  isWithinSelection: (element: PlaitElement) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plait/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"
@@ -1,7 +1,9 @@
1
1
  import { PlaitBoard } from '../interfaces/board';
2
+ import { PlaitElement } from '../interfaces';
2
3
  export declare function withSelection(board: PlaitBoard): PlaitBoard;
3
- export declare function getTemporaryElements(board: PlaitBoard): import("../interfaces").PlaitElement[] | undefined;
4
+ export declare function getTemporaryElements(board: PlaitBoard): PlaitElement[] | undefined;
4
5
  export declare function deleteTemporaryElements(board: PlaitBoard): void;
5
6
  export declare function isSelectionMoving(board: PlaitBoard): boolean;
6
7
  export declare function setSelectionMoving(board: PlaitBoard): void;
7
8
  export declare function clearSelectionMoving(board: PlaitBoard): void;
9
+ export declare function createSelectionOuterG(board: PlaitBoard, selectElements: PlaitElement[]): SVGGElement;
@@ -52,6 +52,11 @@
52
52
  overflow: auto;
53
53
  }
54
54
  }
55
+ &.element-moving {
56
+ .selection-outer {
57
+ opacity: 0;
58
+ }
59
+ }
55
60
  }
56
61
 
57
62
  .zoom-toolbar {
@@ -2,13 +2,5 @@ import { Options } from 'roughjs/bin/core';
2
2
  import { RoughSVG } from 'roughjs/bin/svg';
3
3
  /**
4
4
  * drawRoundRectangle
5
- * @param rs RoughSVG
6
- * @param x1 number
7
- * @param y1 number
8
- * @param x2 number
9
- * @param y2 number
10
- * @param options Options
11
- * @param outline boolean
12
- * @returns SVGGElement
13
5
  */
14
6
  export declare function drawRoundRectangle(rs: RoughSVG, x1: number, y1: number, x2: number, y2: number, options: Options, outline?: boolean, borderRadius?: number): SVGGElement;
@@ -30,7 +30,8 @@ export declare function fitViewport(board: PlaitBoard): void;
30
30
  export declare const updateViewportOrigination: (board: PlaitBoard, origination: Point) => void;
31
31
  export declare const clearViewportOrigination: (board: PlaitBoard) => void;
32
32
  export declare const getViewportOrigination: (board: PlaitBoard) => Point | undefined;
33
- export declare const isViewportScrolling: (board: PlaitBoard) => boolean;
34
- export declare const setViewportScrolling: (board: PlaitBoard) => void;
35
- export declare const clearViewportScrolling: (board: PlaitBoard) => void;
33
+ export declare const isFromScrolling: (board: PlaitBoard) => boolean;
34
+ export declare const setIsFromScrolling: (board: PlaitBoard, state: boolean) => void;
35
+ export declare const isFromViewportChange: (board: PlaitBoard) => boolean;
36
+ export declare const setIsFromViewportChange: (board: PlaitBoard, state: boolean) => void;
36
37
  export declare function scrollToRectangle(board: PlaitBoard, client: RectangleClient): void;
@@ -16,4 +16,3 @@ export declare const BOARD_TO_VIEWPORT_ORIGINATION: WeakMap<PlaitBoard, Point>;
16
16
  export declare const BOARD_TO_IS_SELECTION_MOVING: WeakMap<PlaitBoard, boolean>;
17
17
  export declare const BOARD_TO_TEMPORARY_ELEMENTS: WeakMap<PlaitBoard, PlaitElement[]>;
18
18
  export declare const BOARD_TO_MOVING_ELEMENT: WeakMap<PlaitBoard, PlaitElement[]>;
19
- export declare const BOARD_TO_SCROLLING: WeakMap<PlaitBoard, boolean>;