Jürg Lehni
19a9976939
Return emitter in #on(), #off(), #once(), so calls can be chained.
2014-11-18 14:56:55 -08:00
Jürg Lehni
3b2a82047e
Clean up event related comments, to reflect recent renaming.
2014-10-08 18:33:17 +02:00
Jürg Lehni
c7c49d4091
Time to go with the flow and use the on()/off()/emit() pattern for events.
2014-10-08 14:57:56 +02:00
Jürg Lehni
48cb05a181
Replace tabs with 4 white-spaces.
2014-08-16 19:24:54 +02:00
Jürg Lehni
f002c633a7
Remove trailing white spaces and ensure newlines at the end.
2014-04-06 13:48:03 +02:00
Jürg Lehni
59da291d54
Remove tabs in examples in favor of 4 spaces.
...
To remove all these annoying JSHint complaints.
2014-04-02 21:03:35 +02:00
Jürg Lehni
833d71f7ea
Remove Item#type and replace it with Item#className, the non-hyphenated version of #type.
2014-03-18 11:42:38 +01:00
Jürg Lehni
e22fa3a664
Update copyright notice.
2014-01-04 01:47:16 +01:00
Jürg Lehni
976b24b34c
Execute PaperScript using new Function() rather than eval() and with() {}
...
This results in some impressive speeding improvements, as modern JS engines are finally able to optimize the resulting code.
2013-12-29 15:32:23 +01:00
Jürg Lehni
2cfa329fa6
Completely rework event handling on view and tools.
...
Fixes multiple issues on iOS:
- mousedown events were sometimes fired twice.,
- the presence of mousedown handlers broke scrolling.
Closes #266 .
2013-12-06 21:49:44 +01:00
Jürg Lehni
dc732da8d8
Clean up documentation for event handler functions on View and Tool.
2013-10-30 15:38:08 +01:00
Jürg Lehni
c945bf7908
Docs: Various smaller clean ups.
2013-10-16 14:20:13 +02:00
Jürg Lehni
19c7788617
Fix documentation irregularities.
2013-08-23 19:45:28 -07:00
Jürg Lehni
6b19f25f4b
Fix typos in comments.
2013-08-08 15:21:35 -07:00
Jürg Lehni
85d7237c0f
Avoid endless recursion in ToolEvent#middlePoint.
...
Closes #257 .
2013-07-17 16:01:36 -07:00
Jürg Lehni
a4535edbb9
Bring back _class names, since code minification breaks reliance on constructor.name.
...
Closes #248 .
2013-06-23 20:18:32 -07:00
Jürg Lehni
8c596927fb
Store _removeSets per project, not globally.
2013-06-12 13:50:05 -07:00
Jürg Lehni
f59882b757
Handle Tool._removeSets also when there is no corresponding event handler installed.
...
Closes #204 .
2013-06-12 13:46:14 -07:00
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
c533dda7b5
Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
...
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
369b329b23
Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
...
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jürg Lehni
b59a98f7ce
Add jQuery style aliases to Callback and use #on() in the examples rather than #attach().
2013-05-06 20:56:58 -07:00
Jürg Lehni
98f7c020bd
Use Item#type instead of instanceof checks for better performance.
2013-04-19 19:27:02 -07:00
Jürg Lehni
80600d2a2b
Fix issue with removeOnMove() calls sometimes removing items too early.
...
Closes #181 .
2013-03-05 15:22:44 -08:00
Jonathan Puckey
d4c0386e5b
Tool example documentation.
2013-03-03 18:56:11 +01:00
Jürg Lehni
119e5acbf9
Move #_setProperties() and #set() from Item to Base, rename it to #_set and use it for Tool too.
2013-02-15 18:28:49 -08:00
Jürg Lehni
eca4aa8512
Expand shortened variable names.
2013-02-15 00:46:48 -08:00
Jürg Lehni
8b4104fe19
Use Point#equals() instead of direct comparison.
2013-02-14 22:38:08 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
ddf982a446
Add comment to removeOn() code.
2012-12-15 02:40:47 -08:00
Jürg Lehni
900f3fe2dd
Have ToolEvent#item fallback to returning null, not undefined.
2012-11-21 10:38:29 -08:00
Jürg Lehni
01342fa073
Implement onActivate() onDeactivate() handlers on Tool, and remove onSelect() / onDeselect() which never worked.
2012-11-07 01:02:09 -08:00
Jonathan Puckey
772174cedc
Documentation for Tool and View event handling.
2012-02-02 11:45:02 +01:00
Jürg Lehni
6e3cef6eb4
Implement PaperScope#tool accessor.
...
For better handling of automatic tool creation in PaperScript.
2011-12-27 16:33:17 +01:00
Jürg Lehni
cadc2e78ca
We can directly access Item#_id.
...
No need to call Item#getId() internally.
2011-11-28 23:14:02 +01:00
Jürg Lehni
577c884a70
Prepend non-public Tool methods with '_'.
2011-11-16 13:10:39 +01:00
Jürg Lehni
6e5a81f907
Fix white-spaces in documentation.
2011-11-12 18:26:15 +01:00
Jürg Lehni
c33998c140
Remove support for Tool#eventInterval.
2011-11-12 18:26:03 +01:00
Jürg Lehni
3dfb4d3ae5
Make Item#removeOn() calls work with new event callback mechanism.
2011-11-11 20:41:09 +01:00
Jürg Lehni
e238dea3ac
More work to make new events mechanisms work for Tool too.
2011-11-11 19:49:31 +01:00
Jürg Lehni
fe97b94340
Define PaperScopeItem as a private base class for all classes that have lists and references in the PaperScope (Project, View, Tool), so they can share functionality (#initialize(), #activate(), #remove()), and add support for multiple tools. Closes #27
2011-08-02 10:08:08 +01:00
Jonathan Puckey
4daffc895a
Handlers are no longer passed to Tool#initialize().
2011-07-21 00:01:33 +02:00
Jürg Lehni
88626e3903
ToolEvent#getItem(): Replace all #parent getters with direct access to internal variable.
2011-07-19 23:55:56 +01:00
Jürg Lehni
688c1671ed
Remove all parameters from Tool constructor, to simplify use outside PaperScript.
2011-07-19 23:53:13 +01:00
Jonathan Puckey
cb80b828a5
ToolEvent#getItem: replace getter with direct access to internal variable.
2011-07-14 19:28:25 +02:00
Jonathan Puckey
0098e2490f
Implement ToolEvent#item.
2011-07-13 16:52:44 +02:00
Jürg Lehni
133e0fc5cf
Document ToolEvent#type.
2011-07-07 20:52:55 +02:00
Jürg Lehni
79c0ad8cc5
Update copyright notices.
2011-07-01 12:17:45 +02:00
Richard D. Worth
ac39873693
Whitespace. Removed all trailing whitespace from .js files
2011-06-30 06:01:51 -04:00
Jürg Lehni
b0156c0e8b
Replace @type function with @type Function.
2011-06-27 15:34:32 +02:00