Version 1, Update 11
New:
- Access to the current viewport bounds in canvas coordinates.
- Read-only access to the current file name via
figma.root.name
. - New helper methods
findChild
andfindChildren
to search immediate children. - Access to the
constrainProportions
as a node property. - Access to the
strokeMiterLimit
property andoutlineStroke()
method as node properties. - Access to the
scaleFactor
as an instance property. - Access to the
expanded
property on nodes with children. - Added a definition
Rect
(x, y, width, height) to the typings.
Fixed:
- Fixed how the
getRange
/setRange
functions handle unicode characters. Previously, those function took astart
andend
parameter which were interpreted as unicode code points (UCS4). However,node.characters
returns a JavaScript string which is encoded as UTF16. This created an inconsistency where callinggetRange
/setRange
could end up referencing a different range than the one you would expect, if characters that encode differently were present in your strings (such as emojis). Most plugins should simply work better as a result of this change. If you had added workaround code in your plugin, you may now need to remove the workaround.
We also recently released a new version of the desktop app, which uses Electron 6 and Chrome 76. This gives you access to newer Chrome APIs that weren't previously available in the desktop app.