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
findChildandfindChildrento search immediate children. - Access to the
constrainProportionsas a node property. - Access to the
strokeMiterLimitproperty andoutlineStroke()method as node properties. - Access to the
scaleFactoras an instance property. - Access to the
expandedproperty on nodes with children. - Added a definition
Rect(x, y, width, height) to the typings.
Fixed:
- Fixed how the
getRange/setRangefunctions handle unicode characters. Previously, those function took astartandendparameter which were interpreted as unicode code points (UCS4). However,node.charactersreturns a JavaScript string which is encoded as UTF16. This created an inconsistency where callinggetRange/setRangecould 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.