@hufe921/canvas-editor 0.9.49 → 0.9.50

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.
@@ -42,6 +42,7 @@ export declare class Command {
42
42
  executeTableTdVerticalAlign: CommandAdapt['tableTdVerticalAlign'];
43
43
  executeTableBorderType: CommandAdapt['tableBorderType'];
44
44
  executeTableTdBorderType: CommandAdapt['tableTdBorderType'];
45
+ executeTableTdSlashType: CommandAdapt['tableTdSlashType'];
45
46
  executeTableTdBackgroundColor: CommandAdapt['tableTdBackgroundColor'];
46
47
  executeTableSelectAll: CommandAdapt['tableSelectAll'];
47
48
  executeImage: CommandAdapt['image'];
@@ -2,7 +2,7 @@ import { ImageDisplay } from '../../dataset/enum/Control';
2
2
  import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
3
3
  import { ListStyle, ListType } from '../../dataset/enum/List';
4
4
  import { RowFlex } from '../../dataset/enum/Row';
5
- import { TableBorder, TdBorder } from '../../dataset/enum/table/Table';
5
+ import { TableBorder, TdBorder, TdSlash } from '../../dataset/enum/table/Table';
6
6
  import { TitleLevel } from '../../dataset/enum/Title';
7
7
  import { VerticalAlign } from '../../dataset/enum/VerticalAlign';
8
8
  import { ICatalog } from '../../interface/Catalog';
@@ -71,6 +71,7 @@ export declare class CommandAdapt {
71
71
  tableTdVerticalAlign(payload: VerticalAlign): void;
72
72
  tableBorderType(payload: TableBorder): void;
73
73
  tableTdBorderType(payload: TdBorder): void;
74
+ tableTdSlashType(payload: TdSlash): void;
74
75
  tableTdBackgroundColor(payload: string): void;
75
76
  tableSelectAll(): void;
76
77
  hyperlink(payload: IElement): void;
@@ -1,6 +1,7 @@
1
1
  import { Draw } from '../Draw';
2
2
  export declare class Background {
3
3
  private draw;
4
+ private options;
4
5
  constructor(draw: Draw);
5
6
  render(ctx: CanvasRenderingContext2D, pageNo: number): void;
6
7
  }
@@ -10,6 +10,7 @@ export declare class TableParticle {
10
10
  getTrListGroupByCol(payload: ITr[]): ITr[];
11
11
  getRangeRowCol(): ITd[][] | null;
12
12
  private _drawOuterBorder;
13
+ private _drawSlash;
13
14
  private _drawBorder;
14
15
  private _drawBackgroundColor;
15
16
  computeRowColInfo(element: IElement): void;
@@ -33,6 +33,7 @@ export declare class CanvasEvent {
33
33
  selectAll(): void;
34
34
  mousemove(evt: MouseEvent): void;
35
35
  mousedown(evt: MouseEvent): void;
36
+ click(): void;
36
37
  mouseup(evt: MouseEvent): void;
37
38
  mouseleave(evt: MouseEvent): void;
38
39
  keydown(evt: KeyboardEvent): void;
@@ -6,3 +6,7 @@ export declare enum TableBorder {
6
6
  export declare enum TdBorder {
7
7
  BOTTOM = "bottom"
8
8
  }
9
+ export declare enum TdSlash {
10
+ FORWARD = "forward",
11
+ BACK = "back"
12
+ }
@@ -17,7 +17,7 @@ import { BlockType } from './dataset/enum/Block';
17
17
  import { IBlock } from './interface/Block';
18
18
  import { ILang } from './interface/i18n/I18n';
19
19
  import { VerticalAlign } from './dataset/enum/VerticalAlign';
20
- import { TableBorder, TdBorder } from './dataset/enum/table/Table';
20
+ import { TableBorder, TdBorder, TdSlash } from './dataset/enum/table/Table';
21
21
  import { MaxHeightRatio, NumberType } from './dataset/enum/Common';
22
22
  import { TitleLevel } from './dataset/enum/Title';
23
23
  import { ListStyle, ListType } from './dataset/enum/List';
@@ -38,5 +38,5 @@ export default class Editor {
38
38
  use: UsePlugin;
39
39
  constructor(container: HTMLDivElement, data: IEditorData | IElement[], options?: IEditorOption);
40
40
  }
41
- export { EDITOR_COMPONENT, LETTER_CLASS, Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak };
41
+ export { EDITOR_COMPONENT, LETTER_CLASS, Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, TdSlash, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak };
42
42
  export type { IElement, IEditorData, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang, ICatalog, ICatalogItem, IRangeStyle };
@@ -32,6 +32,7 @@ export interface IEditorOption {
32
32
  height?: number;
33
33
  scale?: number;
34
34
  pageGap?: number;
35
+ backgroundColor?: string;
35
36
  underlineColor?: string;
36
37
  strikeoutColor?: string;
37
38
  rangeColor?: string;
@@ -1,5 +1,5 @@
1
1
  import { VerticalAlign } from '../../dataset/enum/VerticalAlign';
2
- import { TdBorder } from '../../dataset/enum/table/Table';
2
+ import { TdBorder, TdSlash } from '../../dataset/enum/table/Table';
3
3
  import { IElement, IElementPosition } from '../Element';
4
4
  import { IRow } from '../Row';
5
5
  export interface ITd {
@@ -21,6 +21,7 @@ export interface ITd {
21
21
  verticalAlign?: VerticalAlign;
22
22
  backgroundColor?: string;
23
23
  borderType?: TdBorder;
24
+ slashType?: TdSlash;
24
25
  mainHeight?: number;
25
26
  realHeight?: number;
26
27
  realMinHeight?: number;
@@ -1 +1,2 @@
1
1
  export declare const isApple: boolean;
2
+ export declare const isIOS: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hufe921/canvas-editor",
3
3
  "author": "Hufe",
4
4
  "license": "MIT",
5
- "version": "0.9.49",
5
+ "version": "0.9.50",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",