blockly 11.0.0-beta.8 → 11.0.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/blockly.min.js +456 -475
- package/blockly.mjs +143 -0
- package/blockly_compressed.js +426 -445
- package/blockly_compressed.js.map +1 -1
- package/blocks.js +4 -0
- package/blocks.mjs +12 -0
- package/blocks_compressed.js +22 -23
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +52 -4
- package/core/block_svg.d.ts +22 -2
- package/core/blockly.d.ts +0 -4
- package/core/clipboard/block_paster.d.ts +3 -1
- package/core/clipboard/workspace_comment_paster.d.ts +5 -4
- package/core/comments/comment_view.d.ts +6 -1
- package/core/comments/rendered_workspace_comment.d.ts +22 -4
- package/core/constants.d.ts +5 -0
- package/core/contextmenu.d.ts +1 -34
- package/core/contextmenu_items.d.ts +8 -0
- package/core/contextmenu_registry.d.ts +18 -3
- package/core/dragging/block_drag_strategy.d.ts +1 -8
- package/core/dragging/comment_drag_strategy.d.ts +1 -0
- package/core/events/events_block_change.d.ts +15 -0
- package/core/events/utils.d.ts +1 -3
- package/core/field.d.ts +20 -4
- package/core/field_input.d.ts +4 -3
- package/core/field_registry.d.ts +35 -3
- package/core/flyout_base.d.ts +8 -0
- package/core/grid.d.ts +9 -0
- package/core/interfaces/i_flyout.d.ts +10 -0
- package/core/keyboard_nav/ast_node.d.ts +10 -1
- package/core/layer_manager.d.ts +11 -0
- package/core/serialization/blocks.d.ts +1 -0
- package/core/serialization/workspace_comments.d.ts +1 -1
- package/core/utils/toolbox.d.ts +1 -0
- package/core/workspace.d.ts +9 -1
- package/core/workspace_svg.d.ts +10 -2
- package/core.js +4 -0
- package/dart.js +4 -0
- package/dart.mjs +6 -0
- package/index.mjs +143 -0
- package/javascript.js +4 -0
- package/javascript.mjs +6 -0
- package/lua.js +4 -0
- package/lua.mjs +6 -0
- package/media/resize-handle.svg +1 -1
- package/msg/ab.js +8 -7
- package/msg/ab.mjs +423 -0
- package/msg/ace.js +8 -7
- package/msg/ace.mjs +423 -0
- package/msg/af.js +8 -7
- package/msg/af.mjs +423 -0
- package/msg/am.js +8 -7
- package/msg/am.mjs +423 -0
- package/msg/ar.js +8 -7
- package/msg/ar.mjs +423 -0
- package/msg/ast.js +8 -7
- package/msg/ast.mjs +423 -0
- package/msg/az.js +8 -7
- package/msg/az.mjs +423 -0
- package/msg/ba.js +8 -7
- package/msg/ba.mjs +423 -0
- package/msg/bcc.js +8 -7
- package/msg/bcc.mjs +423 -0
- package/msg/be-tarask.js +8 -7
- package/msg/be-tarask.mjs +423 -0
- package/msg/be.js +8 -7
- package/msg/be.mjs +423 -0
- package/msg/bg.js +8 -7
- package/msg/bg.mjs +423 -0
- package/msg/bn.js +8 -7
- package/msg/bn.mjs +423 -0
- package/msg/br.js +8 -7
- package/msg/br.mjs +423 -0
- package/msg/bs.js +8 -7
- package/msg/bs.mjs +423 -0
- package/msg/ca.js +8 -7
- package/msg/ca.mjs +423 -0
- package/msg/cdo.js +8 -7
- package/msg/cdo.mjs +423 -0
- package/msg/ce.js +8 -7
- package/msg/ce.mjs +423 -0
- package/msg/cs.js +8 -7
- package/msg/cs.mjs +423 -0
- package/msg/da.js +8 -7
- package/msg/da.mjs +423 -0
- package/msg/de.js +27 -26
- package/msg/de.mjs +423 -0
- package/msg/diq.js +8 -7
- package/msg/diq.mjs +423 -0
- package/msg/dtp.js +8 -7
- package/msg/dtp.mjs +423 -0
- package/msg/dty.js +8 -7
- package/msg/dty.mjs +423 -0
- package/msg/ee.js +8 -7
- package/msg/ee.mjs +423 -0
- package/msg/el.js +123 -122
- package/msg/el.mjs +423 -0
- package/msg/en-gb.js +8 -7
- package/msg/en-gb.mjs +423 -0
- package/msg/en.js +8 -7
- package/msg/en.mjs +423 -0
- package/msg/eo.js +8 -7
- package/msg/eo.mjs +423 -0
- package/msg/es.js +8 -7
- package/msg/es.mjs +423 -0
- package/msg/et.js +8 -7
- package/msg/et.mjs +423 -0
- package/msg/eu.js +8 -7
- package/msg/eu.mjs +423 -0
- package/msg/fa.js +10 -9
- package/msg/fa.mjs +423 -0
- package/msg/fi.js +8 -7
- package/msg/fi.mjs +423 -0
- package/msg/fo.js +8 -7
- package/msg/fo.mjs +423 -0
- package/msg/fr.js +11 -10
- package/msg/fr.mjs +423 -0
- package/msg/frr.js +8 -7
- package/msg/frr.mjs +423 -0
- package/msg/gl.js +8 -7
- package/msg/gl.mjs +423 -0
- package/msg/gn.js +8 -7
- package/msg/gn.mjs +423 -0
- package/msg/gor.js +8 -7
- package/msg/gor.mjs +423 -0
- package/msg/ha.js +8 -7
- package/msg/ha.mjs +423 -0
- package/msg/hak.js +8 -7
- package/msg/hak.mjs +423 -0
- package/msg/he.js +8 -7
- package/msg/he.mjs +423 -0
- package/msg/hi.js +8 -7
- package/msg/hi.mjs +423 -0
- package/msg/hr.js +8 -7
- package/msg/hr.mjs +423 -0
- package/msg/hrx.js +8 -7
- package/msg/hrx.mjs +423 -0
- package/msg/hsb.js +8 -7
- package/msg/hsb.mjs +423 -0
- package/msg/hu.js +8 -7
- package/msg/hu.mjs +423 -0
- package/msg/hy.js +8 -7
- package/msg/hy.mjs +423 -0
- package/msg/ia.js +8 -7
- package/msg/ia.mjs +423 -0
- package/msg/id.js +8 -7
- package/msg/id.mjs +423 -0
- package/msg/ig.js +8 -7
- package/msg/ig.mjs +423 -0
- package/msg/inh.js +8 -7
- package/msg/inh.mjs +423 -0
- package/msg/is.js +8 -7
- package/msg/is.mjs +423 -0
- package/msg/it.js +8 -7
- package/msg/it.mjs +423 -0
- package/msg/ja.js +8 -7
- package/msg/ja.mjs +423 -0
- package/msg/ka.js +8 -7
- package/msg/ka.mjs +423 -0
- package/msg/kab.js +8 -7
- package/msg/kab.mjs +423 -0
- package/msg/kbd-cyrl.js +8 -7
- package/msg/kbd-cyrl.mjs +423 -0
- package/msg/km.js +8 -7
- package/msg/km.mjs +423 -0
- package/msg/kn.js +8 -7
- package/msg/kn.mjs +423 -0
- package/msg/ko.js +9 -8
- package/msg/ko.mjs +423 -0
- package/msg/ksh.js +8 -7
- package/msg/ksh.mjs +423 -0
- package/msg/ku-latn.js +8 -7
- package/msg/ku-latn.mjs +423 -0
- package/msg/ky.js +8 -7
- package/msg/ky.mjs +423 -0
- package/msg/la.js +8 -7
- package/msg/la.mjs +423 -0
- package/msg/lb.js +8 -7
- package/msg/lb.mjs +423 -0
- package/msg/lki.js +8 -7
- package/msg/lki.mjs +423 -0
- package/msg/lo.js +8 -7
- package/msg/lo.mjs +423 -0
- package/msg/lrc.js +8 -7
- package/msg/lrc.mjs +423 -0
- package/msg/lt.js +8 -7
- package/msg/lt.mjs +423 -0
- package/msg/lv.js +8 -7
- package/msg/lv.mjs +423 -0
- package/msg/mg.js +8 -7
- package/msg/mg.mjs +423 -0
- package/msg/mk.js +8 -7
- package/msg/mk.mjs +423 -0
- package/msg/ml.js +8 -7
- package/msg/ml.mjs +423 -0
- package/msg/mnw.js +8 -7
- package/msg/mnw.mjs +423 -0
- package/msg/ms.js +9 -8
- package/msg/ms.mjs +423 -0
- package/msg/my.js +8 -7
- package/msg/my.mjs +423 -0
- package/msg/mzn.js +8 -7
- package/msg/mzn.mjs +423 -0
- package/msg/nb.js +8 -7
- package/msg/nb.mjs +423 -0
- package/msg/ne.js +225 -224
- package/msg/ne.mjs +423 -0
- package/msg/nl.js +15 -14
- package/msg/nl.mjs +423 -0
- package/msg/oc.js +8 -7
- package/msg/oc.mjs +423 -0
- package/msg/olo.js +8 -7
- package/msg/olo.mjs +423 -0
- package/msg/pa.js +8 -7
- package/msg/pa.mjs +423 -0
- package/msg/pl.js +8 -7
- package/msg/pl.mjs +423 -0
- package/msg/pms.js +8 -7
- package/msg/pms.mjs +423 -0
- package/msg/ps.js +8 -7
- package/msg/ps.mjs +423 -0
- package/msg/pt-br.js +10 -9
- package/msg/pt-br.mjs +423 -0
- package/msg/pt.js +8 -7
- package/msg/pt.mjs +423 -0
- package/msg/ro.js +8 -7
- package/msg/ro.mjs +423 -0
- package/msg/ru.js +9 -8
- package/msg/ru.mjs +423 -0
- package/msg/sc.js +8 -7
- package/msg/sc.mjs +423 -0
- package/msg/sco.js +8 -7
- package/msg/sco.mjs +423 -0
- package/msg/sd.js +8 -7
- package/msg/sd.mjs +423 -0
- package/msg/shn.js +8 -7
- package/msg/shn.mjs +423 -0
- package/msg/si.js +8 -7
- package/msg/si.mjs +423 -0
- package/msg/sk.js +8 -7
- package/msg/sk.mjs +423 -0
- package/msg/skr-arab.js +8 -7
- package/msg/skr-arab.mjs +423 -0
- package/msg/sl.js +8 -7
- package/msg/sl.mjs +423 -0
- package/msg/smn.js +8 -7
- package/msg/smn.mjs +423 -0
- package/msg/sq.js +8 -7
- package/msg/sq.mjs +423 -0
- package/msg/sr-latn.js +8 -7
- package/msg/sr-latn.mjs +423 -0
- package/msg/sr.js +8 -7
- package/msg/sr.mjs +423 -0
- package/msg/sv.js +8 -7
- package/msg/sv.mjs +423 -0
- package/msg/sw.js +8 -7
- package/msg/sw.mjs +423 -0
- package/msg/ta.js +14 -13
- package/msg/ta.mjs +423 -0
- package/msg/tcy.js +8 -7
- package/msg/tcy.mjs +423 -0
- package/msg/tdd.js +11 -10
- package/msg/tdd.mjs +423 -0
- package/msg/te.js +8 -7
- package/msg/te.mjs +423 -0
- package/msg/th.js +8 -7
- package/msg/th.mjs +423 -0
- package/msg/ti.js +8 -7
- package/msg/ti.mjs +423 -0
- package/msg/tl.js +8 -7
- package/msg/tl.mjs +423 -0
- package/msg/tlh.js +8 -7
- package/msg/tlh.mjs +423 -0
- package/msg/tr.js +10 -9
- package/msg/tr.mjs +423 -0
- package/msg/ug-arab.js +8 -7
- package/msg/ug-arab.mjs +423 -0
- package/msg/uk.js +8 -7
- package/msg/uk.mjs +423 -0
- package/msg/ur.js +8 -7
- package/msg/ur.mjs +423 -0
- package/msg/uz.js +8 -7
- package/msg/uz.mjs +423 -0
- package/msg/vi.js +11 -10
- package/msg/vi.mjs +423 -0
- package/msg/xmf.js +8 -7
- package/msg/xmf.mjs +423 -0
- package/msg/yo.js +8 -7
- package/msg/yo.mjs +423 -0
- package/msg/zgh.js +8 -7
- package/msg/zgh.mjs +423 -0
- package/msg/zh-hans.js +9 -8
- package/msg/zh-hans.mjs +423 -0
- package/msg/zh-hant.js +18 -17
- package/msg/zh-hant.mjs +423 -0
- package/package.json +12 -2
- package/php.js +4 -0
- package/php.mjs +6 -0
- package/python.js +4 -0
- package/python.mjs +6 -0
- package/core/workspace_comment.d.ts +0 -190
- package/core/workspace_comment_svg.d.ts +0 -360
- package/msg/yue.d.ts +0 -8
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Object representing a code comment on a rendered workspace.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_selected.js';
|
|
12
|
-
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
13
|
-
import type { ICopyable } from './interfaces/i_copyable.js';
|
|
14
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
15
|
-
import { Rect } from './utils/rect.js';
|
|
16
|
-
import { WorkspaceComment } from './workspace_comment.js';
|
|
17
|
-
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
18
|
-
import { WorkspaceCommentCopyData } from './clipboard/workspace_comment_paster.js';
|
|
19
|
-
/**
|
|
20
|
-
* Class for a workspace comment's SVG representation.
|
|
21
|
-
*/
|
|
22
|
-
export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBoundedElement, ICopyable<WorkspaceCommentCopyData> {
|
|
23
|
-
/**
|
|
24
|
-
* The width and height to use to size a workspace comment when it is first
|
|
25
|
-
* added, before it has been edited by the user.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
static DEFAULT_SIZE: number;
|
|
30
|
-
/** Offset from the top to make room for a top bar. */
|
|
31
|
-
private static readonly TOP_OFFSET;
|
|
32
|
-
workspace: WorkspaceSvg;
|
|
33
|
-
/** Mouse up event data. */
|
|
34
|
-
private onMouseUpWrapper;
|
|
35
|
-
/** Mouse move event data. */
|
|
36
|
-
private onMouseMoveWrapper;
|
|
37
|
-
/** Whether event handlers have been initialized. */
|
|
38
|
-
private eventsInit;
|
|
39
|
-
private textarea;
|
|
40
|
-
private svgRectTarget;
|
|
41
|
-
private svgHandleTarget;
|
|
42
|
-
private foreignObject;
|
|
43
|
-
private resizeGroup;
|
|
44
|
-
private deleteGroup;
|
|
45
|
-
private deleteIconBorder;
|
|
46
|
-
private focused;
|
|
47
|
-
private autoLayout;
|
|
48
|
-
private readonly svgGroup;
|
|
49
|
-
svgRect_: SVGRectElement;
|
|
50
|
-
/** Whether the comment is rendered onscreen and is a part of the DOM. */
|
|
51
|
-
private rendered;
|
|
52
|
-
/**
|
|
53
|
-
* @param workspace The block's workspace.
|
|
54
|
-
* @param content The content of this workspace comment.
|
|
55
|
-
* @param height Height of the comment.
|
|
56
|
-
* @param width Width of the comment.
|
|
57
|
-
* @param opt_id Optional ID. Use this ID if provided, otherwise create a new
|
|
58
|
-
* ID.
|
|
59
|
-
*/
|
|
60
|
-
constructor(workspace: WorkspaceSvg, content: string, height: number, width: number, opt_id?: string);
|
|
61
|
-
/**
|
|
62
|
-
* Dispose of this comment.
|
|
63
|
-
*
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
dispose(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Create and initialize the SVG representation of a workspace comment.
|
|
69
|
-
* May be called more than once.
|
|
70
|
-
*
|
|
71
|
-
* @param opt_noSelect Text inside text area will be selected if false
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
initSvg(opt_noSelect?: boolean): void;
|
|
75
|
-
/**
|
|
76
|
-
* Handle a pointerdown on an SVG comment.
|
|
77
|
-
*
|
|
78
|
-
* @param e Pointer down event.
|
|
79
|
-
*/
|
|
80
|
-
private pathMouseDown;
|
|
81
|
-
/**
|
|
82
|
-
* Show the context menu for this workspace comment.
|
|
83
|
-
*
|
|
84
|
-
* @param e Pointer event.
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
showContextMenu(e: PointerEvent): void;
|
|
88
|
-
/**
|
|
89
|
-
* Select this comment. Highlight it visually.
|
|
90
|
-
*
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
select(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Unselect this comment. Remove its highlighting.
|
|
96
|
-
*
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
unselect(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Select this comment. Highlight it visually.
|
|
102
|
-
*
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
addSelect(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Unselect this comment. Remove its highlighting.
|
|
108
|
-
*
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
removeSelect(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Focus this comment. Highlight it visually.
|
|
114
|
-
*
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
addFocus(): void;
|
|
118
|
-
/**
|
|
119
|
-
* Unfocus this comment. Remove its highlighting.
|
|
120
|
-
*
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
removeFocus(): void;
|
|
124
|
-
/**
|
|
125
|
-
* Return the coordinates of the top-left corner of this comment relative to
|
|
126
|
-
* the drawing surface's origin (0,0), in workspace units.
|
|
127
|
-
* If the comment is on the workspace, (0, 0) is the origin of the workspace
|
|
128
|
-
* coordinate system.
|
|
129
|
-
* This does not change with workspace scale.
|
|
130
|
-
*
|
|
131
|
-
* @returns Object with .x and .y properties in workspace coordinates.
|
|
132
|
-
* @internal
|
|
133
|
-
*/
|
|
134
|
-
getRelativeToSurfaceXY(): Coordinate;
|
|
135
|
-
/**
|
|
136
|
-
* Move a comment by a relative offset.
|
|
137
|
-
*
|
|
138
|
-
* @param dx Horizontal offset, in workspace units.
|
|
139
|
-
* @param dy Vertical offset, in workspace units.
|
|
140
|
-
* @internal
|
|
141
|
-
*/
|
|
142
|
-
moveBy(dx: number, dy: number): void;
|
|
143
|
-
/**
|
|
144
|
-
* Transforms a comment by setting the translation on the transform attribute
|
|
145
|
-
* of the block's SVG.
|
|
146
|
-
*
|
|
147
|
-
* @param x The x coordinate of the translation in workspace units.
|
|
148
|
-
* @param y The y coordinate of the translation in workspace units.
|
|
149
|
-
* @internal
|
|
150
|
-
*/
|
|
151
|
-
translate(x: number, y: number): void;
|
|
152
|
-
/**
|
|
153
|
-
* Move this comment during a drag.
|
|
154
|
-
*
|
|
155
|
-
* @param newLoc The location to translate to, in workspace coordinates.
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
|
-
moveDuringDrag(newLoc: Coordinate): void;
|
|
159
|
-
/**
|
|
160
|
-
* Move the bubble group to the specified location in workspace coordinates.
|
|
161
|
-
*
|
|
162
|
-
* @param x The x position to move to.
|
|
163
|
-
* @param y The y position to move to.
|
|
164
|
-
* @internal
|
|
165
|
-
*/
|
|
166
|
-
moveTo(x: number, y: number): void;
|
|
167
|
-
/**
|
|
168
|
-
* Clear the comment of transform="..." attributes.
|
|
169
|
-
* Used when the comment is switching from 3d to 2d transform or vice versa.
|
|
170
|
-
*/
|
|
171
|
-
private clearTransformAttributes;
|
|
172
|
-
/**
|
|
173
|
-
* Returns the coordinates of a bounding box describing the dimensions of this
|
|
174
|
-
* comment.
|
|
175
|
-
* Coordinate system: workspace coordinates.
|
|
176
|
-
*
|
|
177
|
-
* @returns Object with coordinates of the bounding box.
|
|
178
|
-
* @internal
|
|
179
|
-
*/
|
|
180
|
-
getBoundingRectangle(): Rect;
|
|
181
|
-
/**
|
|
182
|
-
* Add or remove the UI indicating if this comment is movable or not.
|
|
183
|
-
*
|
|
184
|
-
* @internal
|
|
185
|
-
*/
|
|
186
|
-
updateMovable(): void;
|
|
187
|
-
/**
|
|
188
|
-
* Set whether this comment is movable or not.
|
|
189
|
-
*
|
|
190
|
-
* @param movable True if movable.
|
|
191
|
-
* @internal
|
|
192
|
-
*/
|
|
193
|
-
setMovable(movable: boolean): void;
|
|
194
|
-
/**
|
|
195
|
-
* Set whether this comment is editable or not.
|
|
196
|
-
*
|
|
197
|
-
* @param editable True if editable.
|
|
198
|
-
*/
|
|
199
|
-
setEditable(editable: boolean): void;
|
|
200
|
-
/**
|
|
201
|
-
* Recursively adds or removes the dragging class to this node and its
|
|
202
|
-
* children.
|
|
203
|
-
*
|
|
204
|
-
* @param adding True if adding, false if removing.
|
|
205
|
-
* @internal
|
|
206
|
-
*/
|
|
207
|
-
setDragging(adding: boolean): void;
|
|
208
|
-
/**
|
|
209
|
-
* Return the root node of the SVG or null if none exists.
|
|
210
|
-
*
|
|
211
|
-
* @returns The root SVG node (probably a group).
|
|
212
|
-
* @internal
|
|
213
|
-
*/
|
|
214
|
-
getSvgRoot(): SVGElement;
|
|
215
|
-
/**
|
|
216
|
-
* Returns this comment's text.
|
|
217
|
-
*
|
|
218
|
-
* @returns Comment text.
|
|
219
|
-
* @internal
|
|
220
|
-
*/
|
|
221
|
-
getContent(): string;
|
|
222
|
-
/**
|
|
223
|
-
* Set this comment's content.
|
|
224
|
-
*
|
|
225
|
-
* @param content Comment content.
|
|
226
|
-
* @internal
|
|
227
|
-
*/
|
|
228
|
-
setContent(content: string): void;
|
|
229
|
-
/**
|
|
230
|
-
* Update the cursor over this comment by adding or removing a class.
|
|
231
|
-
*
|
|
232
|
-
* @param enable True if the delete cursor should be shown, false otherwise.
|
|
233
|
-
* @internal
|
|
234
|
-
*/
|
|
235
|
-
setDeleteStyle(enable: boolean): void;
|
|
236
|
-
/**
|
|
237
|
-
* Set whether auto-layout of this bubble is enabled. The first time a bubble
|
|
238
|
-
* is shown it positions itself to not cover any blocks. Once a user has
|
|
239
|
-
* dragged it to reposition, it renders where the user put it.
|
|
240
|
-
*
|
|
241
|
-
* @param _enable True if auto-layout should be enabled, false otherwise.
|
|
242
|
-
* @internal
|
|
243
|
-
*/
|
|
244
|
-
setAutoLayout(_enable: boolean): void;
|
|
245
|
-
/**
|
|
246
|
-
* Encode a comment subtree as XML with XY coordinates.
|
|
247
|
-
*
|
|
248
|
-
* @param opt_noId True if the encoder should skip the comment ID.
|
|
249
|
-
* @returns Tree of XML elements.
|
|
250
|
-
* @internal
|
|
251
|
-
*/
|
|
252
|
-
toXmlWithXY(opt_noId?: boolean): Element;
|
|
253
|
-
/**
|
|
254
|
-
* Encode a comment for copying.
|
|
255
|
-
*
|
|
256
|
-
* @returns Copy metadata.
|
|
257
|
-
*/
|
|
258
|
-
toCopyData(): WorkspaceCommentCopyData;
|
|
259
|
-
/**
|
|
260
|
-
* Returns a bounding box describing the dimensions of this comment.
|
|
261
|
-
*
|
|
262
|
-
* @returns Object with height and width properties in workspace units.
|
|
263
|
-
* @internal
|
|
264
|
-
*/
|
|
265
|
-
getHeightWidth(): {
|
|
266
|
-
height: number;
|
|
267
|
-
width: number;
|
|
268
|
-
};
|
|
269
|
-
/**
|
|
270
|
-
* Renders the workspace comment.
|
|
271
|
-
*
|
|
272
|
-
* @internal
|
|
273
|
-
*/
|
|
274
|
-
render(): void;
|
|
275
|
-
/**
|
|
276
|
-
* Create the text area for the comment.
|
|
277
|
-
*
|
|
278
|
-
* @returns The top-level node of the editor.
|
|
279
|
-
*/
|
|
280
|
-
private createEditor;
|
|
281
|
-
/** Add the resize icon to the DOM */
|
|
282
|
-
private addResizeDom;
|
|
283
|
-
/** Add the delete icon to the DOM */
|
|
284
|
-
private addDeleteDom;
|
|
285
|
-
/**
|
|
286
|
-
* Handle a pointerdown on comment's resize corner.
|
|
287
|
-
*
|
|
288
|
-
* @param e Pointer down event.
|
|
289
|
-
*/
|
|
290
|
-
private resizeMouseDown;
|
|
291
|
-
/**
|
|
292
|
-
* Handle a pointerdown on comment's delete icon.
|
|
293
|
-
*
|
|
294
|
-
* @param e Pointer down event.
|
|
295
|
-
*/
|
|
296
|
-
private deleteMouseDown;
|
|
297
|
-
/**
|
|
298
|
-
* Handle a pointerout on comment's delete icon.
|
|
299
|
-
*
|
|
300
|
-
* @param _e Pointer out event.
|
|
301
|
-
*/
|
|
302
|
-
private deleteMouseOut;
|
|
303
|
-
/**
|
|
304
|
-
* Handle a pointerup on comment's delete icon.
|
|
305
|
-
*
|
|
306
|
-
* @param e Pointer up event.
|
|
307
|
-
*/
|
|
308
|
-
private deleteMouseUp;
|
|
309
|
-
/** Stop binding to the global pointerup and pointermove events. */
|
|
310
|
-
private unbindDragEvents;
|
|
311
|
-
/**
|
|
312
|
-
* Handle a pointerup event while dragging a comment's border or resize
|
|
313
|
-
* handle.
|
|
314
|
-
*
|
|
315
|
-
* @param _e Pointer up event.
|
|
316
|
-
*/
|
|
317
|
-
private resizeMouseUp;
|
|
318
|
-
/**
|
|
319
|
-
* Resize this comment to follow the pointer.
|
|
320
|
-
*
|
|
321
|
-
* @param e Pointer move event.
|
|
322
|
-
*/
|
|
323
|
-
private resizeMouseMove;
|
|
324
|
-
/**
|
|
325
|
-
* Callback function triggered when the comment has resized.
|
|
326
|
-
* Resize the text area accordingly.
|
|
327
|
-
*/
|
|
328
|
-
private resizeComment;
|
|
329
|
-
/**
|
|
330
|
-
* Set size
|
|
331
|
-
*
|
|
332
|
-
* @param width width of the container
|
|
333
|
-
* @param height height of the container
|
|
334
|
-
*/
|
|
335
|
-
private setSize;
|
|
336
|
-
/**
|
|
337
|
-
* Set the focus on the text area.
|
|
338
|
-
*
|
|
339
|
-
* @internal
|
|
340
|
-
*/
|
|
341
|
-
setFocus(): void;
|
|
342
|
-
/**
|
|
343
|
-
* Remove focus from the text area.
|
|
344
|
-
*
|
|
345
|
-
* @internal
|
|
346
|
-
*/
|
|
347
|
-
blurFocus(): void;
|
|
348
|
-
/**
|
|
349
|
-
* Decode an XML comment tag and create a rendered comment on the workspace.
|
|
350
|
-
*
|
|
351
|
-
* @param xmlComment XML comment element.
|
|
352
|
-
* @param workspace The workspace.
|
|
353
|
-
* @param opt_wsWidth The width of the workspace, which is used to position
|
|
354
|
-
* comments correctly in RTL.
|
|
355
|
-
* @returns The created workspace comment.
|
|
356
|
-
* @internal
|
|
357
|
-
*/
|
|
358
|
-
static fromXmlRendered(xmlComment: Element, workspace: WorkspaceSvg, opt_wsWidth?: number): WorkspaceCommentSvg;
|
|
359
|
-
}
|
|
360
|
-
//# sourceMappingURL=workspace_comment_svg.d.ts.map
|