Khan / Prototope

Swift library of lightweight interfaces for prototyping, bridged to JS
http://khan.github.io/Prototope
230 stars 18 forks source link

Protoscope crashes when you don't pass the right type into segments property #92

Closed nefaurk closed 9 years ago

nefaurk commented 9 years ago

The following code will cause Protoscope to crash on the device:

let polygon = new ShapeLayer() polygon.segments = [new Point({x: 0, y: 0})]

It looks like segments expects an array of Segment objects, not Point objects. We should probably throw a Protonope instead of crashing.

jbrennan commented 9 years ago

Fixed by 131718f

jbrennan commented 9 years ago

We might also want to consider just accepting an array of Point objects too.