Commit Graph

526 Commits

Author SHA1 Message Date
jdescottes
7357614d9a Fix : Window resize is erasing the canvas
Issue was coming from the cached frame renderer.
During the window resize, we update the displaySize of the frame renderer,
regardless of the fact that the dimensions changed or not.

The setDisplaySize triggers a destruction of the canvas. But the
CachedFrameRenderer will render the frame only if it detects a change. In
this case, setDisplaySize has been overrided in CachedFrameRenderer to
skip any processing if the dimensions didn't change.

This behavior could be actually done in the FrameRenderer itself, but
since this is crucial to the CachedFrameRenderer behavior, I prefer to
keep it in this class.

Alternatively, could implement a way to discard caches of
CachedFrameRenderers from the outside.
2014-03-30 23:28:18 +02:00
jdescottes
090443c318 Feature : Color palette : fix spectrum issue
The palette manager UI is redrawn almost everytime the model changes.
This way, UI is always in sync with the model.

However, spectrum instances are spawning everytime a redraw is performed.
They cannot be cleaned before the redraw is performed, because if a
spectrum picker is opened, it should remain like this. This allows the
cuser to keep modifying a color without having to reopen the picker each
time he/she stops on a color.

As a workaround, I keep a reference on all the spectrum containers and
destroy them all when the manager is disposed.

Ideally I'd prefer to have a single spectrum instance that I could move
around depending on which color the user wants to edit. I.e. I want to
mutualize all the picker instances ...  But this will require a bit more
work.

Also added a notification when the user saves a palette.
Updated z-index of user-message container so that it is always above the
rest of the application.
2014-03-30 22:42:28 +02:00
jdescottes
3be4c78883 Fix : resize application on startup to adapt correctly to narrow screens 2014-03-30 21:55:29 +02:00
jdescottes
3765ce3d5e Issue #158 : updated zindex of minimap zoom square 2014-03-30 21:29:44 +02:00
jdescottes
4410aa5420 minor fix : remove console.log in PalettesListController 2014-03-30 21:01:14 +02:00
jdescottes
6d62d11872 Fix : drawing with the right mouse button (FF, IE)
Mousemove events do not have the correct button information
Need to keep the state of which button is clicked at which moment

This was actually the initial implementation ...
But I removed it because I couldn't remember why we did this in the
beginning.

Added lots of 'warnings' in comments, but won't be safe until we get good
integration tests.

References :
- FF : https://bugzilla.mozilla.org/show_bug.cgi?id=297919
"What if multiple buttons are pressed during mouse move?  And how does the
integer field (button) indicate that no button is pressed?  I think this
should be wontfix -- if people need button information during mouse move events
we need a new way of getting it (buttonSet), not the same way it works for click,
etc."
- IE : couldn't find any reference ...
2014-03-30 20:39:00 +02:00
jdescottes
b734db28dc Css fix + bug fix : double palette created when empty local storage 2014-03-30 16:54:26 +02:00
jdescottes
5b7e07e11e Fixed : spectrum pickers where no destroyed properly 2014-03-30 16:20:58 +02:00
jdescottes
7f17e17cff Minor css fix : adding 5px margin to palettes-list-colors 2014-03-30 15:38:13 +02:00
jdescottes
231ae9e165 Feature : color palette
- Fixed : manager UI is redrawn after save
- the Selected palette is saved as a user preference
- default background is now the dark one
- the selected palette is not reset after closing palette manager
2014-03-30 14:56:31 +02:00
jdescottes
4947cc4820 moved css to avoid img relative path issue after build 2014-03-30 03:11:31 +02:00
jdescottes
0e94606f41 moved css to avoid img relative path issue after build 2014-03-30 03:10:34 +02:00
jdescottes
b0ed5e4a7f Feature : palette color manager
- implemented save all functionality
- minor css update
2014-03-30 01:59:14 +01:00
juliandescottes
85b64a9f04 test 2014-03-30 01:12:01 +01:00
juliandescottes
d2ec797496 integrate palette list with palette manager 2014-03-30 01:10:00 +01:00
jdescottes
41e52a7a39 minor css fixes 2014-03-29 18:49:31 +01:00
jdescottes
f2da622edb Merge + palette manager 1st drop
- can create palettes
- palettes are persisted to local storage
- can add colors to palettes using spectrum color picker
- can remove created palettes
- can revert changes on unsaved palettes

Merge branch 'master' into feature-color-palette

Conflicts:
	src/css/spectrum/spectrum-overrides.css
2014-03-29 18:35:56 +01:00
Julian Descottes
f2aceedefd Merge pull request #157 from juliandescottes/feature-colorpicker-hexa
Feature colorpicker hexa
2014-03-26 07:51:36 +01:00
jdescottes
173936d74f Force rgb format, remove extra padding 2014-03-26 07:50:37 +01:00
jdescottes
d4f315e0c1 Color Palette : Added popup mgr + palettes list 2014-03-26 07:41:45 +01:00
jdescottes
1f022fd4a7 Enhancement : Add hint to see Keyboard cheatsheet 2014-03-18 01:45:59 +01:00
jdescottes
8581e4ec65 feature : allow user to input hexa for color 2014-03-16 23:41:38 +01:00
jdescottes
903f6817cf feature : allow to delete current selection
* Users can now use DEL to delete the current selection
* Cheatsheet has been updated accordingly
* Cheatsheet has been refactored to mutualize markup creation code
2014-03-16 23:22:47 +01:00
jdescottes
4b0b1a4bad doc : Updated JS Doc for ImageResizer 2014-03-16 22:53:10 +01:00
jdescottes
9ae01cb074 feature : change grid size
* removed SHOW_GRID boolean, replaced with GRID_WIDTH
* gridEnabled on a frame is now infered from the grid width setting
* updated template to use a select to pick the grid size
2014-03-16 22:46:43 +01:00
jdescottes
87574a2b30 Cleanup project root 2014-03-16 21:15:34 +01:00