gss / engine

GSS engine
http://gss.github.io
MIT License
2.87k stars 103 forks source link

Hello World example errors when using Electron #212

Closed mbigras closed 8 years ago

mbigras commented 8 years ago

I'm write the GSS Hello World example using Electron. The code for the example can be found in this repo.

When I run it the output appears to be as expected; however, I get a bunch of errors in my console. I also continue to generate errors as I resize the app window (see below and attached image)

Is it possible to recreate the standard Hello World example in electron without generating errors? Also any information on how to properly use GSS with Electron would be greatly appreciated, thanks 😄

main.js:36 Uncaught TypeError: Cannot read property 'on' of undefined
gss.js:15781 Uncaught TypeError: Cannot read property 'engine' of undefined
gss.js:23151 $3[intrinsic-width] is looping:  Array[3]  and now  81 againapply @ gss.js:23151
gss.js:23151 $3[width] is looping:  Array[3]  and now  81 againapply @ gss.js:23151
gss.js:23151 $3[x] is looping:  Array[3]  and now  359.5 againapply @ gss.js:23151
gss.js:23151 $3[width] is looping:  Array[3]  and now  81 againapply @ gss.js:23151
gss.js:23151 $3[x] is looping:  Array[3]  and now  359.5 againapply @ gss.js:23151
gss.js:23151 $2[x] is looping:  [143.5, 144]  and now  143.5 againapply @ gss.js:23151each @ gss.js:23125Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $2[x] is looping:  [143.5, 144]  and now  143.5 againapply @ gss.js:23151each @ gss.js:23126Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $3[x] is looping:  [150.5, 151]  and now  150.5 againapply @ gss.js:23151each @ gss.js:23125Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $3[x] is looping:  [150.5, 151]  and now  150.5 againapply @ gss.js:23151each @ gss.js:23126Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $2[x] is looping:  [148.5, 149]  and now  148.5 againapply @ gss.js:23151each @ gss.js:23125Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $2[x] is looping:  [148.5, 149]  and now  148.5 againapply @ gss.js:23151each @ gss.js:23126Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $3[x] is looping:  [155.5, 156]  and now  155.5 againapply @ gss.js:23151each @ gss.js:23125Engine.commit @ gss.js:15634Engine.solve @ gss.js:15574(anonymous function) @ gss.js:15112
gss.js:23151 $3[x] is looping:  [155.5, 156]  and now  

Qix- commented 7 years ago

FWIW for anyone looking at this presently, this is pretty innocuous. To be honest, it should be shown as a warning and should be disable-able. This is simply a warning that two constraints are producing somewhat similar values and that cassowary is converging on one. If those values (e.g. [150.5, 151]) start to diverge too far you might see some flickering of the values (positions, etc.).

Otherwise, you can safely ignore them.