slalom icon indicating copy to clipboard operation
slalom copied to clipboard

Variable c not in scope of MotionContext

Open natew opened this issue 9 years ago • 3 comments

Trying to use slalom and I ran into an error here:

https://github.com/iamralpht/slalom/blob/cc3d6f7b106499373fc54876ca7328a3a9322a00/src/MotionContext.js#L9

c is not defined for that file.

natew avatar Apr 07 '15 22:04 natew

After more exploration I realize it's just not ready for npm. Shimmed Gravitas, Cassowary and Hammer and tried to get one of your demos working but so far no luck. As far as I've gotten is this:

http://cl.ly/image/3H1z3r1Z2i3W

Uncaught (c.InternalError) Constraint not found in removeEditVarsTo

This is the repo, to run it just install npm install -g reapp && reapp run and it should be running for you: https://github.com/natew/slalom-experiments

natew avatar Apr 07 '15 23:04 natew

You also need to include cassowary.js, which isn't pulled in by require. The examples do this, but it's not ideal. I've been looking into alternative constraint solvers recently, which would allow non-linear relationships.

iamralpht avatar Apr 08 '15 14:04 iamralpht

Yea I pulled them together in this project: https://github.com/natew/slalom-experiments/blob/master/package.json

You could have it as a peerDependency in your project, or include it in your project and export it.

Looking forward to hearing more about what you're exploring. Once you have something sort of working I'll be playing with putting together some stuff with React and maybe react-canvas. You should tweet your latest findings!

natew avatar Apr 08 '15 17:04 natew