Commit Graph

136 Commits

Author SHA1 Message Date
juliandescottes
e852fb7c57 Merge with master after PR zoom-level 2013-11-23 19:50:53 +01:00
jdescottes
0a05374af5 feature : add keyboard shortcuts
+ added shortcut to create new frames (n)
+ added shortcut to duplicate frame (shift+n)
2013-11-20 22:58:20 +01:00
jdescottes
6eabf01ffc feature : add keyboard shortcuts
+ decentralized shortcut declaration
+ each service/controller is now responsible for declaring its shorcuts
- documentation (cheatsheet) is still to be maintained manually
- init order matters (shortcutService has to be instanciated before
  everyone else) => should have a standalone KeyboardService singleton
  which is ready as soon as it is loaded
2013-11-19 23:46:33 +01:00
jdescottes
a0273edb3e feature : add keyboard shortcuts
+ cleanup of color management
+ colors are now stored in palette controller
+ drawing controller has a dependency on palette controller
+ UPDATE COLOR events have been removed (they were used only for
synchronizing palette and drawing controller)
2013-11-19 07:40:35 +01:00
jdescottes
e0b76f5329 feature : add keyboard shortcuts : added help panel displayed on shift+? 2013-11-18 23:53:12 +01:00
jdescottes
c033d65cde fix : tool icon not selected when using shortcut 2013-11-17 22:47:21 +01:00
jdescottes
f0ef016309 feature : add keyboard shortcuts : initial impl
+ added shortcuts for all tools in ToolController
+ modified structure of tools in Controller to Array of descriptors to
allow to declare shortcuts directly when setting up the tool controller
2013-11-17 22:07:26 +01:00
jdescottes
5d83a39cf0 feature : add keyboard shortcuts : Events cleanup
+ Removed unused events
2013-11-17 20:20:27 +01:00
jdescottes
3af64d3f45 feature : zoom level : code review
+ added explanatory comment for CanvasUtils.disableImageSmoothing
+ detect browser for chosing wheel/mousewheel event in DrawingController
+ create ABSTRACT_FUNCTION constant to be reused forabstract methods
2013-11-15 00:32:18 +01:00
jdescottes
c8a8d470a7 renamed all references to dpi to zoom for consistency (also wtf dpi anyway !) 2013-11-05 22:11:47 +01:00
jdescottes
bd030fdf1f Merge branch 'master' into zoom-level 2013-11-05 00:15:08 +01:00
jdescottes
cd4952cc7b feature : zoom-level
- Minimap usability : mouseup and mousemove events are now plugged on
  document.body instead of the minimap's controller. This way the user can
  move his mouse outside the container to keep moving the map's frame.
  Also the mouseup information is no longer lost if it occurs outside for
  the minimap.
2013-11-02 11:24:02 +01:00
jdescottes
eb559eee0c fix : import-picture-panel
- When imported 1 picture and then importing another one, the picture
  preview was not cleaned and was displaying the two images side by side.
  Fixed in ImportController.js
- Switched all double-quoted strings in ImportController to single-quoted
  strings. Should enforce this using jshint
- Aligned all inputs in the import picture panel
- Renamed 'Preview :' import section to 'Info :'. Mostly it's to make it
  shorter, but also I'd like to display additional information to the
  right of the preview in the future.
2013-11-02 11:02:03 +01:00
jdescottes
e0d63bf295 fix : renderer resize on window resize 2013-11-02 00:00:38 +01:00
jdescottes
8a380b6c78 merged from master 2013-11-01 23:37:09 +01:00
jdescottes
bd99027852 feature : zoom
- Added MinimapController that displays a frame on the animated preview
  when zoomed in
- Added bounds for the offset to make sure it doesn't go crazy
- Added new utility Math.js with a minmax function
- TODO : the minimap controller has a lot of dependencies, see if could be
  cleaned up
- TODO : DrawingController knows the size of the picture it has to render
  only indirectly, which makes it hard in some cases (such as boundary
  checking performed during setOffset)
2013-11-01 23:11:11 +01:00
jdescottes
472906957a feature : zoom :
- Extracted layers rendering logic from DrawingController to dedicated
  class
- Turned RendererManager into Composite renderer (extends
  AbstractRenderer)
- AbstractRenderer no longer contains a render(frame) method, implementing
  the render differs too much between my current renderers to impose a
  single signature, but I should improve this later if too much time on ma
  hands
2013-11-01 17:12:59 +01:00
jdescottes
b7e8310b61 feature : zoom : continued
- simplified Renderer(s) architecture (removed decorator,
  CachedFrameRenderer simply inherits from FrameRenderer now)
- keeping AbstractRenderer to act as interface
- fixed issue with layers : forgot to clone the first frame while merging
  and therefore was modifying the original frame when I just wanted to
  create a tmp frame (FrameUtils.js)
- extracted the mousemove throttling delay used in DrawingController to
  Constants.js and reduced it from 40ms to 10ms
2013-11-01 16:27:23 +01:00
jdescottes
51f86afe6e feature : zoom
- Created AbstractRenderer in rendering package
- Created CachedRenderer and CachedFrameRenderer to extract basic frame
  caching logic from DrawingController
- Created RendererManager to synchronize updates made to several Renderer
  settings
- Moved FrameRenderer from pskl.rendering to pskl.rendering.frame
- Fixed the resize of the drawing area when the window is resized
2013-11-01 15:39:42 +01:00
jdescottes
7490651f83 Zoom initial implementation. No UI, only bound to mousewheel. Everything is broken, to amend ! 2013-10-29 22:16:39 +01:00
jdescottes
a0a1fa7bdf Added preview picture. Added a flow : start with only file input enabled 2013-10-23 23:34:09 +02:00
jdescottes
3dde3504d1 Synchronize resize fields, resize image when importing 2013-10-23 01:01:35 +02:00
jdescottes
6c0f54032d Import panel 2013-10-22 07:40:08 +02:00
jdescottes
61419f0bba import panel : before removal of import from URL option 2013-10-21 23:08:12 +02:00
jdescottes
2509ba80a4 intermediary 2013-10-18 08:01:25 +02:00
jdescottes
07cb37f2bf Merge branch 'master' into import-picture-panel 2013-10-16 23:15:09 +02:00
jdescottes
1156008213 Import from file 2013-10-16 23:14:41 +02:00
jdescottes
f549174424 Import panel:
- added pskl.controller.settings.ImportController (empty atm)
- moved SettingsController under settings namespace
- move settings templates in a dedicated folder
- created import icon (svg is in the resources folder)
- added import button in right-layer
2013-10-11 00:04:40 +02:00
jdescottes
55e3607ecc Cleanup of saving/loading process 2013-10-10 00:06:11 +02:00
jdescottes
564f74265a Piskel website adaptations :
M CanvasRenderer : can set the color used to represent transparency
M app.js : modified code responsible for saving when in website mode
M PiskelController.js : just some argument renaming
2013-10-08 23:44:06 +02:00
jdescottes
2686a2e944 Layers:Review:Removed grid drawing routine : was never drawn 2013-09-30 22:44:02 +02:00
jdescottes
f514b6cd10 Layers:Review:Cleanup of GifExportController 2013-09-30 22:00:31 +02:00
jdescottes
7aa407970f Layers:Review:Rename LayersController to LayersListController 2013-09-30 21:22:58 +02:00
jdescottes
90f2fac2d3 Layers:Minor style changes 2013-09-29 23:33:40 +02:00
jdescottes
4eebff804b Layers:Review:Renamed layers-container to layers-list-container. Extracted URLs to Constant.js 2013-09-29 23:26:09 +02:00
jdescottes
76511058d1 Layers:Review:Rename renderers frame up/down to above/below 2013-09-29 23:16:32 +02:00
jdescottes
4f754c6af2 Layers:Review:Changed FrameRenderer className property to classes (array) 2013-09-29 23:14:10 +02:00
jdescottes
17ba93cc9f Layers:Review:Renamed layers canvases css classes to layers-above/below-canvas 2013-09-29 23:05:24 +02:00
Julian Descottes
be9238c9b1 Layers : FRAMESHEET_RESET -> PISKEL_RESET
Framesheet no longer exists.
2013-09-29 00:01:18 +02:00
Julian Descottes
ca427e0853 Dev environment : closure compiler + jshint update
Fixed error raised by closure compiler
Added es3 option to jshint (detect trailing commas)
Added curly option to jshint (missing curly braces for if/for blocks)
Removed trailing whitespaces (not enforced through jshint though)
2013-09-28 23:52:51 +02:00
jdescottes
1bc73125dc Fix jscolor : add jscolor.install to Palette Controller init sequence. Fix layer canvas update on DPI change 2013-09-26 22:43:45 +02:00
jdescottes
50ca22d91a Clear layers canvas before redraw 2013-09-26 21:53:37 +02:00
jdescottes
3a8d96f840 Arrow icons update 2013-09-26 07:47:11 +02:00
jdescottes
9395be3034 Layers : add layer icon. Position buttons on top of list. Fix name generation issue 2013-09-25 22:43:21 +02:00
jdescottes
80a9fe3396 First layer UI. Just functional, UX far from ideal 2013-09-25 00:11:12 +02:00
jdescottes
6528c7724b Issue 24 : Layers
!! NOT STABLE !!
Initial implementation. No UI update yet.
Check js/model/Piskel.js and js/model/Layer.js for an overview of the new
API.

Piskels can be saved on the existing service.

Previous piskels cannot be loaded. This should be fixed soon.
2013-09-22 21:02:43 +02:00
jdescottes
4f6863eb8a Gif export panel first draft 2013-09-07 17:50:43 +02:00
jdescottes
73b98850db Added cheap lazy templates + logic to switch between setting controllers 2013-08-12 07:31:09 +02:00
jdescottes
f468790baa Merge from master + added more jshint checks (undef and latedef). Very helpful to catch post merge issues. 2013-08-10 14:28:10 +02:00
jdescottes
87a68bfe21 Dev environment:force indentation to 2 spaces. Added new grunt module, grunt-leading-indent to check space consistency, and modified jshint options to enforce 2 spaces 2013-08-10 12:11:16 +02:00