Released 23 July, 2019 – read release notes
Changes
Card Sketch #53 Hello scrappers and welcome to our first card sketch of the month by Kelly! This one is a little patriotic but can be for anything as well! And here are the amazing cards by our design team: Leah. 101 Drawing Ideas for Your Sketchbook — 18 Comments Charles Impavido on September 25, 2014 at 5:06 am said: Dear Matt, Thank you for the suggestions. I’m sure they will be of use. Nancy Lynn on September 26, 2014 at 11:43 am said: I was just looking for some ideas for sketchbook assignments for my students. It was like you read my mind. Washington Irving (April 3, 1783 – November 28, 1859) was an American short-story writer, essayist, biographer, historian, and diplomat of the early 19th century.He is best known for his short stories 'Rip Van Winkle' (1819) and 'The Legend of Sleepy Hollow' (1820), both of which appear in his collection The Sketch.
Added a colorSpace
property and a changeColorSpace
method to Document
Sketch has 3 different color profiles:
Unmanaged
, sRGB
, and P3
. You can read the current color profile and set a new one. Be careful with assigning a new color profile as there are two subtle, yet impactful, ways of modifying the document: Assign and Convert.Assign
Assign will apply the current RGB values to the selected profile. This will subtly change the appearance of some colors.
Convert
Convert will change the RGB values for the selected profile, but colors will try to appear mostly the same. Green and Red hues will be the most affected. Remote desktop manager enterprise 2020 1 0 000.
For more information on color profiles read the sketch help document on color management. Candle download free.
Usage
Logging native structs now have nicer output in DevTools
Previously, logging things like
NSRange
would return an unhelpful message and now it returns the location and range as you would expect.Expose substring in Text.fragment
Now there is more information about how a piece of text breaks across multiple lines.
You’ll have access to the
rect
, baselineOffset
, range
, and text
of each line. baselineOffset
is the distance from the bottom of the line fragment rectangle in which the glyph resides to the baseline (here is a graphic to help visualize this)baselineOffset
is the distance from the baseline to the bottom line (frame) of the text (or the Descent height + the Line gap height).Usage
symbol.getParentSymbolMaster
used to throw an error. It will now return undefined
Usage
Fix setting layers of a group when the layers already had a parent
There was a bug with reassigning layers to a group that already had parents. You would need to first remove the parent before assigning the layers to a group.
Usage
Changing the pointType
of a CurvePoint wouldn’t always restore the control points
Sketch 53 101 Dr
There was a bug with setting the
pointType
of a line. This made it so that you could only create straight lines rather than curved ones.Usage
Added multiline functionality to string inputs on UI.getInputFromUser
Previously you could only ask for a single line of input from a user via the JS API. Now you can specify a number of lines so that users can input larger amounts of text.
Usage
ShapeType.Rectangle
used to be defaulted even if some points are specified when create a new ShapePath
Previously, you couldn’t draw a proper line with the API (you could get close but it didn’t quite behave the same as a line that you could draw in Sketch). This has been now fixed.
From the API documentation on ShapePath:
You can only set the
shapeType
when creating a new one. Once it is created, the shapeType
is read-only. If it is not specified and you do not specify any points
, it will default to ShapePath.ShapeType.Rectangle
(if you do specify some points
, it will default to ShapePath.ShapeType.Custom
Sketch 53 101 Way
Usage
![Sketch 53 101 Sketch 53 101](https://www.wsfa.com/resizer/Y-dH-geElP_TpFHbbX8yw3ofyYA=/1200x600/d1acid63ghtydj.cloudfront.net/10-13-2020/t_75d7f53ed41f46fea74f3086cd43ccd9_name_file_1280x720_2000_v3_1_.jpg)
Improve consistency by deprecating Fill.fill
in favor of Fill.fileType
This change was made to match
Border.fileType
and other typesUsage
Added a Find Method to easily query a scope of a document
Last but not least is a new way to find objects that meet various criteria. It’s somewhat similar to jquery selectors. The find method can take two arguments:
- A selector (the properties or criteria that you are trying to find)
- The scope (what part of the sketch document do you want to search - by default it is the current document)
Selectors are of type
string
and can be the following:- name
- id
- frame
- frame.x
- frame.y
- frame.width
- frame.height
- locked
- hidden
- selected
- type
- style.fills.color
You can use these selectors in conjunction with an operator:
=
(equal)*=
(contains)$=
(endswith)!=
(not equal)^=
(begins with)>=
(greater than or equal)=<
(less than or equal)>
(greater than)<
(less than)
An example of this would be
find('[name='Rectangle']', document)
. Some Selectors have shorthand notation- type:
find('ShapePath', document)
- id:
find(`#${layer_id}`, document)
orfind('#91EC1D70-6A97-..-DEE84160C4F4', document)
- all others:
find('[='Something']', document)
Also, by default the scope is the current document so you can drop the scope if you like
find('[name='Rectangle']')
Usage
Related resources
See something wrong or incomplete? Improve this page.