jacopocolo / p5-sketchplugin

A plugin for using p5.js code inside Sketch
http://www.jacopocolo.com/p5sketchplugin/
GNU Lesser General Public License v2.1
220 stars 12 forks source link

Text() crashes in Sketch 48 beta 3 #18

Closed jacopocolo closed 6 years ago

jacopocolo commented 6 years ago

Not sure why yet but running any type of text() crashes the plugin AND Sketch 48 beta 3.

jacopocolo commented 6 years ago

The problem is clearly related to the way color is assigned to text. Will investigate


  if (drawingContext.hasFill() == true) {
  textLayer.textColor = drawingContext.fillColor();
  }

  if (drawingContext.hasStroke() == true) {
  var border = textLayer.style().addStylePartOfType(1);
  border.color = drawingContext.strokeColor();
  border.thickness = drawingContext.strokeThikness();
  var borderOptions = textLayer.style().borderOptions();
  }````
jacopocolo commented 6 years ago

Fixed in 1.1.0