Commit Graph
13 Commits
Author SHA1 Message Date
Ivan Wang 3e497794de Only drag sprites when mousedown starts on the sprite 2017-04-11 17:41:18 -07:00
Christopher Willis-Ford 2be8205aee Move scratch-storage init/attach to vmListenerHOC
Attaching the storage module in `vmListenerHOC` means it can propagate
down to the GUI, stage, and blocks naturally. The default VM property
value has been removed from those places so that we're not instantiating
extra VM instances any more. Instead, using one of those components
outside of the `vmListenerHOC` framework will require providing a VM
instance as a property.
2017-03-23 11:58:07 -07:00
Christopher Willis-Ford d79a25aa1e Move scratch-storage init/attach from stage to GUI 2017-03-22 21:17:14 -07:00
Christopher Willis-Ford 4f66fbc48b Create ScratchStorage instance & give it to the VM
There are a handful of places where the GUI code could use the storage
module directly; converting those is for a later change.
2017-03-20 15:28:37 -07:00
Ray Schamp 5647854df9 Implement drag and drop for sprites on the stage (#159)
* WIP: drag states in stage component

* WIP: Hacky drag canvas

* Update sprite position on drag

Use VM to put sprite into drag state and update the sprite's position while dragging.

Temporarily don't use the drawable data to drag a new canvas, this can happen whne we have somewhere to drag the sprite to.
2017-03-03 10:06:14 -05:00
Ray Schamp 6385cb069c Cache stage bounding box
`getBoundingClientRect` forces WebKit to recalculate the layout ("force reflow"), so cache the canvas bounding box rather than getting it on every mouse event.
2017-01-31 10:38:58 -05:00
Eric Rosenbaum 2dd8c55ba0 update package name for scratch-audio 2017-01-06 10:14:32 -05:00
Eric Rosenbaum 58984a1ec5 instantiate audio engine on stage 2017-01-04 18:35:20 -05:00
Ray Schamp 16fbb64cca Use CSS modules for styles
The inline css method gives us nothing that CSS modules can't give us. This puts the project more in line with the way www works, and makes CSS actually readable.

Using class names gives us full control of the modal styles.
2016-12-07 15:59:07 -05:00
Ray Schamp 2060cb0b38 Fix lint warnings 2016-11-17 16:06:45 -05:00
Ray Schamp c11500f4dc Remove animationFrame 2016-11-04 13:41:34 -04:00
Ray Schamp 767721be14 All the rest of the linting 2016-10-22 11:44:23 -04:00
Ray Schamp 7f9d9729c6 Lint: JS -> JSX 2016-10-22 11:07:29 -04:00