Skip to content

Commit 231c64c

Browse files
authored
Merge pull request #224 from AdobeXD/xd-30-docs
XD 30 docs changes
2 parents 9642a26 + ef8f57d commit 231c64c

File tree

3 files changed

+75
-2
lines changed

3 files changed

+75
-2
lines changed

changes.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
XD Release 30.0.12 (June 2020)
4+
-------------------------------------
5+
6+
### New features
7+
* **Scrollable Groups** -- Plugins will see a new [ScrollableGroup](./reference/scenegraph.md#ScrollableGroup) node type and can read the scroll direction(s) and viewport size. Plugins cannot yet create a ScrollableGroup or modify its viewport, however.
8+
9+
### Known Issues
10+
* **Content Aware Stacks** -- Some plugin actions, such as changing a node's position or its Responsive Resize constraints, may be ignored or behave unexpectedly when the node's parent is a Group with Stack layout enabled. Plugins cannot yet create, read, or modify Stack layout settings on a Group.
11+
12+
* MouseEvent `clientX`/`clientY` and `offsetX`/`offsetY` values are incorrect (and always have been) -- these values will probably change in the _next_ XD release, so do not rely on them.
13+
14+
315
XD Release 29.0.32 (May 2020)
416
-------------------------------------
517

@@ -34,7 +46,7 @@ Bug fixes:
3446

3547
### Known Issues
3648

37-
* MouseEvent `clientX`/`clientY` and `offsetX`/`offsetY` values are incorrect (and always have been) -- these values will probably change in the _next_ XD release.
49+
* MouseEvent `clientX`/`clientY` and `offsetX`/`offsetY` values are incorrect (and always have been) -- these values will change in a near-future XD release, so do not rely on them.
3850

3951
### Plugin submission process
4052

reference/core/automatic-cleanups.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ To make writing your plugin simpler, XD performs a number of automated cleanups
1414

1515
* **Repeat Grid cell syncing** - Most changes you make inside a Repeat Grid cell are automatically mirrored to all its other cells, except for certain properties
1616
such as text and images which XD permits to vary between grid cells.
17+
18+
* **Content-Aware Group & Stack layout updates** -- The background layer (if any) of a Content-Aware Group will update automatically after a plugin changes the
19+
size or position of its contents. Similarly, changing a node inside a Group with Stack layout will automatically slide its adjacent siblings to preserve a
20+
constant margin around the node. These changes do not occur until after the plugin command finishes.

reference/scenegraph.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function myCommand(selection) {
6363
* [Group](#Group)
6464
* [SymbolInstance](#SymbolInstance)
6565
* [RepeatGrid](#RepeatGrid)
66+
* [ScrollableGroup](#ScrollableGroup)
6667
* [LinkedGraphic](#LinkedGraphic)
6768
* [RootNode](#RootNode)
6869

@@ -534,7 +535,7 @@ True if the node should be included in the output of _File > Export > Batch_ and
534535
**Since**: XD 19
535536

536537
True if the node stays in a fixed position while the Artboard's content is scrolling (when viewed in an interactive prototype).
537-
_Only applicable for nodes whose immediate parent is an Artboard._
538+
_Only applicable for nodes whose immediate parent is an Artboard_ -- this does not apply to content inside a ScrollableGroup!
538539

539540
For other nodes, this property returns undefined and cannot be set. To determine whether those nodes scroll or remain
540541
fixed, walk up the parent chain and check this property on the topmost ancestor in the Artboard.
@@ -866,6 +867,10 @@ Groups and other containers cannot be created directly using scenenode construct
866867
scenegraph (you can't add subtrees all at once) nor can you add an empty Group and then add children to it (can't add nodes outside
867868
the scope of the current _edit context_). Instead, to create Groups and other nested structures, use [commands](commands.md).
868869

870+
Plain Groups (as well as some other node types, like SymbolInstances) can have dynamic layout features enabled such as padding and
871+
stack layouts. These are sometimes referred to as Content-Aware Groups or Stack containers, but ultimately these appear in the API as
872+
plain Group nodes. They do not carry the same edit-context restrictions as Masked Groups or other special node types.
873+
869874
In a Mask Group, the mask shape is included in the group's `children` list, at the top of the z order. It is not visible - only its
870875
path outline is used, for clipping the group.
871876

@@ -976,6 +981,8 @@ complete list). Attempting to set this property on such node types results in an
976981
### group.mask : ?[<code>SceneNode</code>](#SceneNode)
977982
The mask shape applied to this group, if any. This object is also present in the group's `children` list. Though it has no direct visual appearance of its own, the mask affects the entire group's appearance by clipping all its other content.
978983

984+
The `localBounds`, `globalBounds`, and `globalDrawBounds` of a Masked Group are based on the bounds of the mask shape alone, regardless of whether the content is larger than the mask or even if the content doesn't fill the mask area completely.
985+
979986
**Kind**: instance property of [<code>Group</code>](#Group)
980987
**Read only**: true
981988

@@ -2189,6 +2196,56 @@ You can call this API from either of _two different edit contexts_:
21892196

21902197
* * *
21912198

2199+
<a name="ScrollableGroup"></a>
2200+
2201+
## ScrollableGroup
2202+
**Since:** XD 30
2203+
**Kind**: class
2204+
**Extends**: [<code>SceneNode</code>](#SceneNode)
2205+
2206+
ScrollableGroup nodes are content that users can interactively scroll around. Content is viewed through a [viewport](#ScrollableGroup-viewport),
2207+
with everything else clipped. If a ScrollableGroup is set to only scroll on one axis, on the other axis the viewport is
2208+
automatically sized to exactly fit the bounds of the content so nothing is clipped.
2209+
2210+
The scroll distance range is defined by a _scrollable area_ rectangle which is the union of the viewport and the bounds of all
2211+
the content. This can include some blank space, if the content is initially positioned not filling the entire viewport.
2212+
2213+
* [ScrollableGroup](#ScrollableGroup)
2214+
* [.scrollingType](#ScrollableGroup-scrollingType) : <code>string</code>
2215+
* [.viewport](#ScrollableGroup-viewport) : <code>{! {viewportWidth: number, offsetX: number} | {viewportHeight: number, offsetY: number} |
2216+
{viewportWidth: number, offsetX: number, viewportHeight: number, offsetY: number} }</code>
2217+
2218+
* * *
2219+
2220+
<a name="ScrollableGroup-scrollingType"></a>
2221+
2222+
### ScrollableGroup.scrollingType : <code>string</code>
2223+
The type of scrolling: one of ScrollableGroup.VERTICAL, HORIZONTAL and PANNING.
2224+
PANNING enables scrolling on both axes.
2225+
2226+
**Kind**: instance property of [<code>ScrollableGroup</code>](#ScrollableGroup)
2227+
2228+
* * *
2229+
2230+
<a name="ScrollableGroup-viewport"></a>
2231+
2232+
### ScrollableGroup.viewport : <code>!{viewportWidth: number, offsetX: number} | {viewportHeight: number, offsetY: number} | {viewportWidth: number, offsetX: number, viewportHeight: number, offsetY: number}}</code>
2233+
The viewport is a rectangle whose bounds are defined explicitly on scrolling axes and fit automatically to the
2234+
content on non-scrolling axes:
2235+
* On a scrolling axis, the bounds are specified in [local coordinates](/reference/core/coordinate-spaces-and-units.md)
2236+
using the `viewport` values specified here.
2237+
* On a non-scrolling axis, the bounds are automatically calculated to exactly fit the content (just like the blue
2238+
selection rectangle seen when you select a plain Group).
2239+
2240+
For example, if scrollingType == VERTICAL, the top of the viewport is `viewport.offsetY` in the ScrollableGroup's
2241+
local coordinates, the bottom of the viewport is `viewport.offsetY + viewport.viewportHeight` in local coordinates,
2242+
and horizontally there is no viewport clipping -- the entire current [localBounds](#SceneNode-localBounds) range is visible. The
2243+
`viewport` object will only contain `offsetY` and `viewportHeight` properties in this case.
2244+
2245+
**Kind**: instance property of [<code>ScrollableGroup</code>](#ScrollableGroup)
2246+
2247+
* * *
2248+
21922249
<a name="LinkedGraphic"></a>
21932250

21942251
## LinkedGraphic

0 commit comments

Comments
 (0)