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 |
|
Jürg Lehni
|
7cd749e63d
|
Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples.
|
2011-06-22 23:56:05 +01:00 |
|
Jürg Lehni
|
2bf070415d
|
Have Tool#onHandleEvent() report back if a callback was called or not, and use that to decide if View#draw() should be called, passing true as the to be implemented checkRedraw parameter.
|
2011-06-19 23:02:02 +01:00 |
|
Jürg Lehni
|
3226147e00
|
Use a version of Bootstrap that always produces beans and remove all beans: true instructions.
|
2011-06-17 18:42:29 +01:00 |
|
Jürg Lehni
|
bcff3932b6
|
Have ToolEvent extend Event and move #modifiers documentation there.
|
2011-06-16 21:20:30 +01:00 |
|
Jürg Lehni
|
ffa79f4fd1
|
Clean up white spaces in comments.
|
2011-06-14 22:59:45 +01:00 |
|
Jonathan Puckey
|
a96b272f7a
|
Documentation edits.
|
2011-06-04 15:50:29 +02:00 |
|
Jürg Lehni
|
99e4cc7645
|
Add TODO comment about mousedown events not having delta set the first time.
|
2011-06-02 15:38:12 +01:00 |
|
Jürg Lehni
|
2ab7568d5d
|
Fix typo.
|
2011-06-02 15:36:44 +01:00 |
|
Jürg Lehni
|
016476d1dc
|
Make sure mousemove events have lastPoint set even for the first move so event.delta is always defined for them.
|
2011-06-02 15:33:30 +01:00 |
|
Jürg Lehni
|
29967153c3
|
Clean up TODO comments...
|
2011-06-01 10:49:43 +01:00 |
|
Jonathan Puckey
|
17fcb923ff
|
Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits.
|
2011-05-30 19:42:17 +02:00 |
|
Jonathan Puckey
|
b37604cbac
|
Tool: document onkeyDown and onKeyUp.
|
2011-05-29 15:28:46 +02:00 |
|
Jonathan Puckey
|
1520cad144
|
Documentation: capitalize basic types in @ tags.
|
2011-05-27 21:21:49 +02:00 |
|
Jonathan Puckey
|
8e84c79aa6
|
Documentation: capitalize 'string' and 'number' types.
|
2011-05-27 20:15:15 +02:00 |
|
Jonathan Puckey
|
ca3230c1ad
|
Documentation: reorder functions, add group titles and todos.
|
2011-05-27 13:28:13 +02:00 |
|
Jonathan Puckey
|
eb2694467d
|
ToolEvent documentation: fix whitespace.
|
2011-05-23 20:10:02 +02:00 |
|
Jonathan Puckey
|
ca35b3fe60
|
Add Tool documentation.
|
2011-05-23 16:54:51 +02:00 |
|
Jonathan Puckey
|
8c688bf83d
|
Merge ToolHandler with Tool and remove ToolHandler.
|
2011-05-23 16:30:18 +02:00 |
|
Jonathan Puckey
|
3247527c8d
|
Documentation: Add @lends to ToolHandler to stop it bleeding into the ToolEvent documentation.
|
2011-05-23 04:38:30 +02:00 |
|
Jonathan Puckey
|
a5bf23e33e
|
Add ToolEvent documentation.
|
2011-05-23 04:37:50 +02:00 |
|
Jürg Lehni
|
cfe968d30e
|
Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document.
|
2011-05-16 13:33:15 +01:00 |
|
Jürg Lehni
|
f69b0a404a
|
Remove unused #document from Tool.
|
2011-05-15 22:45:15 +01:00 |
|
Jürg Lehni
|
e8033730c8
|
Move event handling from Tool to DocumentView.
|
2011-05-15 22:25:46 +01:00 |
|
Jürg Lehni
|
f0e8c54008
|
Step one of transition to proper separation of view and document, regarding canvas drawing, mouse interaction, resizing, frame handling, etc. Work in progress.
|
2011-05-15 21:56:43 +01:00 |
|
Jürg Lehni
|
6e0e31480a
|
Remove recently introduced code blocks for small conditional statements.
|
2011-05-15 17:59:37 +01:00 |
|
Jürg Lehni
|
2c078d8b17
|
Remove all code blocks and group titles from documentation since we're relying on Scriptographer code and documentation generation (through javadoc) for docs.
|
2011-05-15 15:01:59 +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 |
|
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
|
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
|
079008b243
|
Code clean up.
|
2011-05-08 21:46:49 +01:00 |
|
Jürg Lehni
|
c44b9b254e
|
Fix error in ToolEvent#delta.
|
2011-05-08 17:32:59 +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 |
|
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 |
|
Jürg Lehni
|
9f47942e7a
|
Fix typo.
|
2011-05-08 15:16:18 +01:00 |
|
Jürg Lehni
|
aac87dba14
|
Move #toString() to the end.
|
2011-05-08 14:13:33 +01:00 |
|
Jürg Lehni
|
926fffee4a
|
Rename Event -> DomEvent and Element -> DomElement, to be more specific and not clash with other classes, e.g. a future base class for ToolEvent and KeyEvent.
|
2011-05-08 10:16:11 +01:00 |
|
Jürg Lehni
|
0e37f86156
|
Fix porting mistakes.
|
2011-05-08 10:07:10 +01:00 |
|
Jürg Lehni
|
afe61d61ac
|
Fix recently introduced errors in setting of Tool#_document.
|
2011-05-07 15:37:12 +01:00 |
|
Jürg Lehni
|
ef8a2aad9b
|
Remove Tool#setDocument().
|
2011-05-07 14:50:31 +01:00 |
|
Jonathan Puckey
|
97b7dacfa2
|
Tool: check for event first, before checking for event.targetTouches.
|
2011-05-07 13:51:26 +01:00 |
|
Jonathan Puckey
|
19a767e6f6
|
Merge remote branch 'origin/master'
|
2011-05-05 11:42:35 +01:00 |
|
Jürg Lehni
|
bc80c58558
|
Add Base.formatNumber() to format numbers in the same way as Scriptographer (precision of up to 5 fractional digits) and use it in the various #toString() functions.
|
2011-05-04 19:42:50 +01:00 |
|
Jonathan Puckey
|
648f0d7db6
|
Tool & Event: support touch events & call onMouseMove (if present) while dragging when there is no onMouseDrag handler.
|
2011-05-04 18:49:30 +01:00 |
|
Jonathan Puckey
|
778997ec18
|
Simplify Key further and fix ToolEvent#getModifiers.
|
2011-04-25 17:38:40 +02:00 |
|
Jonathan Puckey
|
5d15c3dfef
|
Simplify ToolEvent#getModifiers() & small cleanup in Key.
|
2011-04-25 17:26:58 +02:00 |
|
Jonathan Puckey
|
1e4ae9afb4
|
Simplify ToolEvent#modifiers.
|
2011-04-25 12:05:18 +02:00 |
|
Jonathan Puckey
|
22bc08501e
|
Implement ToolEvent#modifiers.
|
2011-04-25 11:52:52 +02:00 |
|
Jürg Lehni
|
6d8379f885
|
Separate Events into Event and Element object, add a row of useful Element helper functions and define experimental Event.requestAnimationFrame().
|
2011-03-14 22:14:20 +01:00 |
|
Jonathan Puckey
|
df0c95e41f
|
Fix bug in Tool.js.
|
2011-03-09 16:51:50 +01:00 |
|
Jürg Lehni
|
6a67052090
|
Update copyright / licensing comments.
|
2011-03-08 01:41:50 +00:00 |
|
Jürg Lehni
|
6d8c7787bd
|
Export ToolEvent too.
|
2011-03-07 11:08:58 +00:00 |
|
Jürg Lehni
|
e1a7aff2f0
|
Add copyright notice and license file.
|
2011-03-07 00:50:44 +00:00 |
|
Jürg Lehni
|
342c5911c1
|
Add Events.getOffset(), to return coordinates relative to the target element's position.
|
2011-03-04 23:46:16 +00:00 |
|
Jürg Lehni
|
298dc912f3
|
Convert Tool to using new Events object instead of realing on full Bootstrap.
|
2011-03-04 23:32:46 +00:00 |
|
Jürg Lehni
|
702899b382
|
Fix a bug in #getFixedDistance() where equals was used on numbers (Java port left-over).
|
2011-03-04 19:16:25 +00:00 |
|
Jürg Lehni
|
92bf51a7cc
|
Simplify the way the paper namespace is created and populated.
|
2011-03-04 13:34:31 +00:00 |
|
Jonathan Puckey
|
81c5e0e4c8
|
Fix ToolHandler#getFixedDistance.
|
2011-03-04 12:20:53 +01:00 |
|
Jürg Lehni
|
6619447aa1
|
Convert ToolEvent type constants to Sg-style hyphenated lowercase strings.
|
2011-03-03 23:06:53 +00:00 |
|
Jürg Lehni
|
2b6dede883
|
Clean up white-spaces and line lengths.
|
2011-03-03 22:45:17 +00:00 |
|
Jürg Lehni
|
7e52355f93
|
Rename Doc -> Document since paper code is namespaced now and does not clash with global Document prototype.
|
2011-03-03 17:23:27 +00:00 |
|
Jürg Lehni
|
5ed30d7089
|
Make sure all files end on empty line.
|
2011-03-03 16:32:55 +00:00 |
|
Jürg Lehni
|
d088dc629e
|
Rename Paper to paper, implement it as an object literal and add paper.populate() and paper.install() methods that do the bootstraping.
|
2011-03-03 16:21:17 +00:00 |
|
Jürg Lehni
|
941c3c7346
|
Declare all classes as local variables, so they can be scoped.
|
2011-03-03 13:33:41 +00:00 |
|
Jonathan Puckey
|
14b8452bad
|
Fix mistakes in Tool.js
|
2011-02-28 19:29:32 +01:00 |
|
Jonathan Puckey
|
4fa293ec6d
|
Have Tool convert points from view coordinates to artwork coordinates.
|
2011-02-28 18:31:03 +01:00 |
|
Jonathan Puckey
|
22bccf3a31
|
Tool: Fix issue with onMouseMove being called while the user is dragging the mouse.
|
2011-02-26 13:00:55 +01:00 |
|
Jonathan Puckey
|
357a8af6ec
|
Clean up white spaces.
|
2011-02-21 03:32:39 +01:00 |
|
Jonathan Puckey
|
51ab66b0f8
|
Remove trailing comma in ToolEvent.
|
2011-02-20 21:22:31 +01:00 |
|
Jürg Lehni
|
c6b5b11b1e
|
Use dragstart event instead of mousedown, to go with drag and dragend.
|
2011-02-15 22:32:05 +00:00 |
|