Releases: esridc/HubTextNotesLayer
Releases · esridc/HubTextNotesLayer
v0.7.0
- Add support for text notes to be attached to features in a Feature Layer. #6
- Consolidation of placement-related options into a single
placement
object:placementHint
=>placement.hint
placementAlignments
=>placement.pointAlignments
(clarify usage)
- Addition of
placement.outsidePolygon
option to allow polygon notes to be allowed to move outside the polygon interior (default), or to be constrained to the interior. - Update note position when its target graphic geometry changes (position and/or shape, e.g. when using sketch tools to move or reshape a drawn graphic).
v0.6.0
v0.5.0
v0.4.0
- Convert rich text to plain text on paste #2
- Add ability to drag notes #3
- Notes can be dragged by the user, with the note location constrained according to the graphic's geometry type. The note snaps to the nearest allowable location.
- Along the path of a line (either side)
- Along the outer ring of a polygon (exterior side only)
- At one of up to 8 cardinal and diagonal positions, configurable per-note (see below).
- Notes are draggable when
editable
(dragging controls are hidden otherwise). - Editable text div is now wrapped by an outer container, which can be draggable.
HubTextNotesLayer
constructor parameters:cssClass
replacestextClass
cssClass
is used to style outer/draggable containernote-text
is used to style the inner/text container
HubTextNotesLayer.addNoteForGraphic()
parameters:placementAlignments
defines a list (array) of allowed placement positions for notes attached to point graphics. Allowed values are:right
,top-right
,top
,top-left
,left
,bottom-left
,bottom
,bottom-right
.
- Notes can be dragged by the user, with the note location constrained according to the graphic's geometry type. The note snaps to the nearest allowable location.
- Use alpha channel when converting text notes to graphics, for Web Map export ae93362
- Explicitly remove event listeners to guard against memory leaks 544bc3f
v0.3.2
v0.3.1
v0.3.0
- Add optional
placementHint
parameter for better control over where notes are placed. Notes are still constrained near the perimeter of the target graphic, but placed in the direction of theplacementHint
. - When positioning notes, anchor them to 8 fixed points on the note (e.g. center top, middle right, center bottom, middle left, and each of the 4 corners) based on their direction. This provides increased stability / less jumpiness, for example when notes are rapidly re-positioned as the user types.
v0.2.0
- Add
HubTextNote.focus()
method (and removefocus
option fromHubTextNotesLayer.addNoteForGraphic()
). - Store note map point as full
Point
geometry instance (for easier JSAPI compatibility when auto-casting not supported). - Improved handling of text background color (only include background color on text when it differs from foreground).
- Get first tests working with JSAPI dependencies.