Commit graph

1066 commits

Author SHA1 Message Date
Jonathan Puckey
4ecf6d2715 Raster example: remove unnecessary document.redraw call. 2011-05-15 15:37:33 +02:00
Jonathan Puckey
f8f6754068 Fix mistake in earlier commit. 2011-05-15 14:26:08 +02:00
Jonathan Puckey
3f8f539aeb Fix bugs in Raster#getAverageColor. 2011-05-15 14:13:47 +02:00
Jonathan Puckey
2c36f3a62e Fix bug in Color#read. 2011-05-15 14:11:35 +02:00
Jonathan Puckey
1a82ef4a34 Merge remote branch 'origin/master' 2011-05-15 14:09:57 +02:00
Jürg Lehni
3078e74f27 Let's not use variable chaining in examples, for clearer code. 2011-05-15 11:36:10 +01:00
Jürg Lehni
51dbd85db5 Add experimental orientation detection for Paths. 2011-05-15 11:33:09 +01:00
Jürg Lehni
06f16d0c2a Define a unique id for each PaperScript. 2011-05-15 11:32:42 +01:00
Jürg Lehni
3cb78db5f5 Fix typo. 2011-05-15 11:32:09 +01:00
Jürg Lehni
1dd0ee2533 Simplify Item#getId() 2011-05-14 22:38:27 +01:00
Jürg Lehni
0d85e0941c Add inverse matrix caching. 2011-05-14 20:20:10 +01:00
Jürg Lehni
064f3e05d3 Simplify paper scope switching code for now, as key handling code depends on paper object to always point to a valid one. This is a workaround, rethinking of how key handling should be distributed across multiple instances within one page is required. 2011-05-14 20:08:14 +01:00
Jürg Lehni
ed2ef0231f Have ctor functions be unnamed, so they don't show as 'ctor' prototypes in debugging. 2011-05-14 20:06:25 +01:00
Jonathan Puckey
fa41328804 Merge remote branch 'origin/master' 2011-05-14 20:37:25 +02:00
Jonathan Puckey
42ae3ce42e CompoundPath#draw: set param.compound to false when done drawing. 2011-05-14 20:36:58 +02:00
Jürg Lehni
2a24ec66ac Have test() method automatically create and remove a Document for reach test. 2011-05-14 18:59:04 +01:00
Jürg Lehni
df1c5cdcbb Add Document#remove(). 2011-05-14 18:58:41 +01:00
Jürg Lehni
5593eb94d0 Simplify Item#_removeFromParent(). 2011-05-14 18:11:31 +01:00
Jürg Lehni
4e059af684 Reassign Item#_index in #reverseChildren(). 2011-05-14 18:07:45 +01:00
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