Commit graph

1147 commits

Author SHA1 Message Date
Jürg Lehni
0bab694a01 Rename Item#children to private Item#_children and add #getChildren getter. 2011-05-14 18:07:10 +01:00
Jürg Lehni
185a7f15ac Fix newly introduced error. 2011-05-14 18:00:29 +01:00
Jürg Lehni
897e00fee5 Have Document#activate() use the internal #_index property. 2011-05-14 17:57:59 +01:00
Jürg Lehni
2fa64bb343 Add Document#getIndex(). 2011-05-14 17:57:43 +01:00
Jürg Lehni
df51b25fec Add comment about plain properties that need to send _changed() notifications. 2011-05-14 17:57:23 +01:00
Jürg Lehni
de34f8c157 Clear Item#_index when removing item and simplify #getIndex(). 2011-05-14 17:56:56 +01:00
Jürg Lehni
25c2d68f37 Switch to Item#_parent / #getParent() as property is read-only. 2011-05-14 17:56:14 +01:00
Jürg Lehni
37e4c654d3 Use Date.now() as all supported browsers have it. 2011-05-14 17:23:17 +01:00
Jürg Lehni
f6f307822a Fix comment. 2011-05-14 17:23:00 +01:00
Jürg Lehni
01fdeb270b Move PaperScript.js to core. 2011-05-14 17:22:49 +01:00
Jürg Lehni
53293ab8bd Merge remote-tracking branch 'origin/master' 2011-05-14 16:00:47 +01:00
Jürg Lehni
0356fdb3b6 Add PaperScope switching to onFrame handler. 2011-05-14 16:00:30 +01:00
Jürg Lehni
8375a97d55 Scope setting / restoring can be simplified since it should never be nested. 2011-05-14 15:59:19 +01:00
Jonathan Puckey
2de41253c2 Fix bug where document wasn't being redrawn after onMouseDrag events. 2011-05-14 16:58:37 +02:00
Jürg Lehni
c89fcdcb2e Merge remote-tracking branch 'origin/master'
Conflicts:
	src/tool/Tool.js
2011-05-14 15:27:56 +01:00
Jürg Lehni
518803f492 Add support for switching PaperScope contexts in PaperScript code exeuction and callback handling. This should add proper support for multiple PaperScript instances in one site. 2011-05-14 14:15:31 +03:00
Jürg Lehni
3072eed91d Clean up ToolHandler code by making many fields private, to better reflect the Java version. 2011-05-14 14:13:48 +03:00
Jonathan Puckey
2bfe42da05 Have the CompoundPath constructor reverse the segments of all paths passed to it except for the first one. Introduce 'keepDirection' option to allow importing of already existing CompoundPath items. 2011-05-14 13:03:18 +02:00
Jonathan Puckey
35d51085a1 Tool: fix problem where document was being redrawn onMouseMove with only an onMouseDrag handler (should only happen on touch devices) 2011-05-14 12:59:21 +02:00
Jürg Lehni
edaaaa4df5 Merge PaperScope injection and creation into one statement. 2011-05-14 13:39:43 +03:00
Jürg Lehni
a1efd85ecb Improve PaperScope definition so it also works when using load.js, and seperate paper.js code into core/Base.js and core/PaperScope.js. 2011-05-14 13:38:45 +03:00
Jürg Lehni
9ef31616d5 Have paper.install() use Base.each(). 2011-05-14 13:14:43 +03:00
Jürg Lehni
d64fe1f179 Improve comments. 2011-05-14 13:12:49 +03:00
Jürg Lehni
91332d465a Switch to using an internal PaperScope class and have the global paper variable simply be a pointer to the currently active one (step one of PaperScope context switching and support of multiple PaperScript instances within one web-site). 2011-05-14 13:10:38 +03:00
Jürg Lehni
3feb45addc Add keepalive attribute to canvas to tag that controls wether it animates in background in emulated requestAnimationFrame() function, and use it in all example files. 2011-05-14 13:04:02 +03:00
Jürg Lehni
a775e66632 Do not use #splice() for the initial push to the documents / children list. 2011-05-14 12:42:52 +03:00
Jürg Lehni
8c2ad5f331 Improve documentating comments. 2011-05-14 12:41:06 +03:00
Jonathan Puckey
032d19b0d2 Fix bug in CompoundPath where toCssString was being called instead of getCanvasStyle, resulting in problems when gradients were used. 2011-05-12 15:30:56 +02:00
Jonathan Puckey
2fd1873b1a Update Raster example to use onFrame event.delta / event.time for raster transformations. 2011-05-11 23:02:36 +02:00
Jonathan Puckey
d3e9a1152d Merge remote branch 'origin/master' 2011-05-11 22:46:53 +02:00
Jonathan Puckey
bd932a9242 Implement onFrame event.delta & event.time. 2011-05-11 22:46:08 +02:00
Jürg Lehni
366122cd33 Merge remote-tracking branch 'origin/master' 2011-05-08 21:46:54 +01:00
Jürg Lehni
079008b243 Code clean up. 2011-05-08 21:46:49 +01:00
Jürg Lehni
b44d85277f Fix resizing of invisible canvas elements, by remembering their last offset when they were visible. 2011-05-08 21:46:41 +01:00
Jonathan Puckey
b7f28140e7 Rework Smoothing example. 2011-05-08 19:14:22 +01:00
Jonathan Puckey
ccf5dd70f6 PaperScript: call the onFrame handler straight away. 2011-05-08 18:44:33 +01:00
Jonathan Puckey
5ddb8e22d3 Merge remote branch 'origin/master' 2011-05-08 17:33:42 +01:00
Jürg Lehni
c44b9b254e Fix error in ToolEvent#delta. 2011-05-08 17:32:59 +01:00
Jürg Lehni
4d6ca5c8c6 Prevent default when handling space key. 2011-05-08 17:26:35 +01:00
Jonathan Puckey
9b295ab649 Rework RotationRaster example. 2011-05-08 17:20:23 +01:00
Jonathan Puckey
34077dc901 Item#_getBounds: don't include bounds of hidden items. 2011-05-08 17:17:54 +01:00
Jonathan Puckey
4490403ae9 Undo last commit. 2011-05-08 16:53:59 +01:00
Jonathan Puckey
6cd8241df8 Set default currentStyle of Document to have a black stroke color. 2011-05-08 16:48:41 +01:00
Jonathan Puckey
b0e91c0173 Merge remote branch 'origin/master' 2011-05-08 16:47:32 +01:00
Jürg Lehni
de2bbe844b Use getters rather than beans. 2011-05-08 15:51:01 +01:00
Jürg Lehni
e79d890432 Add #toString() to Event#modifiers. 2011-05-08 15:50:17 +01:00
Jürg Lehni
585e3b6254 Clean up and shorten code. 2011-05-08 15:45:40 +01:00
Jonathan Puckey
822047cde0 Rework Bouncing Balls example. 2011-05-08 15:44:19 +01:00
Jürg Lehni
af8fd22ae2 Remove hyphen from event types, to go with the naming of the browser world more. 2011-05-08 15:35:10 +01:00
Jürg Lehni
04ff593adc Have Events print modifiers correctly in #toString(). 2011-05-08 15:33:00 +01:00