Lively Kernel canvas
//
DraftTouchApps40
....20null
nullfalsetruenull
Workspace.js:WorkspaceLayerfalsenulltruefalse
false
false
falsenullfalse
http://lively-kernel.org/repository/webwerkstatt/truetruetruetruetrue
truetrue
00.11truetruetrue
codebasefalsenulltruefalsetrue
localfalsenulltruefalsetrue
Localcodefalsetruefalsetrue0false205-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false205
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
20null
truetrue2000000truetrue
00.11truetruetrue
20null
truetruetruetrue
00.11truetruetrue
Addmodulefalsenulltruefalsetrue
Loadallfalsenulltruefalsetrue
LineNofalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
Evalonfalsenulltruefalsetrue
Sortfalsenulltruefalsetrue
Viewas...falsenulltruefalsetrue
truetrue
falsenullnullnullnullfalse
Wikicontroltruetrue
nullfalsetruenull
DraftTouchApps.jsfalsenulltruefalse
false
false
falsenullfalse
http://lively-kernel.org/repository/webwerkstatt/draft/truetruetruetruetrue
truetrue
00.11truetruetrue
codebasefalsenulltruefalsetrue
null
localfalsenulltruefalsetrue
null
connection.js(notparsed)falsetruefalsetrue0false
Draft.js(notparsed)falsetruefalsetrue0false
DraftJournal.js(notparsed)falsetruefalsetrue0false
DraftScripts.js(notparsed)falsetruefalsetrue0false
DraftScrolling.js(notparsed)falsetruefalsetrue0false
DraftTouchApps.jsfalsetruefalsetrue0false
DraftWorkspace.js(notparsed)falsetruefalsetrue0false
Journal.jsfalsetruefalsetrue0false
JournalTest.js(notparsed)falsetruefalsetrue0false
Localcodefalsetruefalsetrue0false
Migration.js(notparsed)falsetruefalsetrue0false
NetworkExtension.js(notparsed)falsetruefalsetrue0false
Watcher.js(notparsed)falsetruefalsetrue0false
widgets2.js(notparsed)falsetruefalsetrue0false168.55nullnulltruefalsenullnulltruetrue
00.11true
null
null
null
nulltruetrue
Event(extension)falsetruefalsetrue0false
HandMorph(extension)falsetruefalsetrue0false
Morph(extension)falsetruefalsetrue0false
TouchMoveLayerfalsetruefalsetrue0false
LivelyPadLayerfalsetruefalsetrue0false
HandMorph(extension)falsetruefalsetrue0false168.5-1nullnullnulltruefalsenullnulltruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false168.5
-1nullnullnulltruefalsenullnulltruetrue
00.11true
null
null
null
nulltruetrue
-----falsetruefalsetrue0false168.5
-1nullnullnulltruetruetrue
00.11true
null
null
null
nulltruetrue
20null
module('draft.DraftTouchApps').requires('lively.TouchSupport').toRun(function(){if(!UserAgent.isTouch)return;Event.touchEvents=["touchstart","touchmove","touchend","touchcancel"];Event.basicInputEvents=Event.basicInputEvents.concat(Event.touchEvents);Event.addMethods({capitalizer:Object.extend(Event.prototype.capitalizer,{//let'smapthetoucheventstomouseeventsfornow//touchstart:'MouseDown',touchmove:'MouseMove',touchend:'MouseUp',touchcancel:'TouchCancel',touchstart:'TouchStart',touchmove:'TouchMove',touchend:'TouchEnd',touchcancel:'TouchCancel',}),isLeftMouseButtonDown:function(){returnthis.rawEvent.button===0;},isTouchEvent:function(){returnEvent.touchEvents.include(this.rawEvent.type);},prepareMousePoint:function(){if(this.isMouseEvent()){this.addMousePoint(this.rawEvent)return;}if(this.isTouchEvent()){vartouch=this.changedTouches()[0];if(!touch){console.warn('Cannotsetuptoucheventbecausecannotfindtouch!');return}this.addMousePoint(touch);}},isGesture:function(){returnthis.touches().length>1},//seehttp://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/touches:function(){returnthis.rawEvent.touches},targetTouches:function(){returnthis.rawEvent.targetTouches},changedTouches:function(){returnthis.rawEvent.changedTouches},});//overwritedefaultbehaviorcreateLayer('TouchSupportLayer')layerClass(TouchSupportLayer,HandMorph,{handleEvent:function(proceed,rawEvt){console.log("handlerawEvt"+rawEvt);varevt=newEvent(rawEvt);evt.hand=this;if(evt.type.startsWith('Touch')){this.handleTouch(evt);evt.stopPropagation();return}//dodefaulteventdispatchevt=proceed(rawEvt);if(!evt.isTouchEvent())return//dirtyhacktoinvokethesoftkeyboard//console.log(evt.type)if(evt.hand.mouseFocus&&evt.hand.mouseFocus.constructor==TextMorph)returnif(rawEvt.changedTouches.length>1){console.log('Multitouch!!!')return}//UserConfig.touchBeMouse?evt.preventDefault();},});enableLayer(TouchSupportLayer)Morph.addMethods({//notusedyetonTouchStart:Morph.prototype.onMouseDown,onTouchMove:Morph.prototype.onMouseMove,onTouchEnd:Morph.prototype.onMouseUp,onTouchCancel:Functions.Null,});cop.create("TouchMoveLayer").refineClass(Morph,{onTouchStart:function(proceed,evt){this.world().setStatusMessage('touchstart'+evt)},onTouchMove:function(proceed,evt){this.world().setStatusMessage('touchmove'+evt)},onTouchEnd:function(proceed,evt){this.world().setStatusMessage('touchend'+evt)},onTouchCancel:function(proceed,evt){this.world().setStatusMessage('touchcancel'+evt)},});TouchMoveLayer.beGlobal();cop.create("LivelyPadLayer").refineClass(WorldMorph,{onEnter:function(proceed){this.world().setStatusMessage('loadingfinished',Color.green,3)},});LivelyPadLayer.beGlobal();//notyetHandMorph.addMethods({handleTouch:function(evt){console.log("handletouch2")console.log("trycalling"+evt.handlerName())this.lastMouseEvent=evt;//evt.mousePointisthepositionifthetouchthatstartedtheeventthis.setPosition(evt.mousePoint);varreceiver=this.world().morphToReceiveEvent(evt);console.log("receiver"+receiver)try{console.log("calling"+evt.handlerName()+"on"+receiver)receiver[evt.handlerName()].call(receiver,evt)}catch(e){console.warn('Toucheventerror:'+e);}returntrue;},});})//endofmodule 1 },\n\t\n\t// see http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/\n\ttouches: function() { return this.rawEvent.touches },\n\ttargetTouches: function() { return this.rawEvent.targetTouches },\n\tchangedTouches: function() { return this.rawEvent.changedTouches },\n\t\n});\n\n// overwrite default behavior\ncreateLayer('TouchSupportLayer')\nlayerClass(TouchSupportLayer, HandMorph, {\n\n\thandleEvent: function(proceed, rawEvt) {\n\t\tconsole.log(\"handle rawEvt\" + rawEvt);\n\t\tvar evt = new Event(rawEvt);\n\t\tevt.hand = this;\n\t\tif (evt.type.startsWith('Touch')) {\n\t\t\tthis.handleTouch(evt);\n\t\t\tevt.stopPropagation();\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// do default event dispatch\n\t\tevt = proceed(rawEvt);\n\n\t\tif (!evt.isTouchEvent()) return\n\n\t\t// dirty hack to invoke the soft keyboard\n\t\t// console.log(evt.type)\n\t\tif (evt.hand.mouseFocus && evt.hand.mouseFocus.constructor == TextMorph) \n\t\t\treturn\n\n\t\tif (rawEvt.changedTouches.length > 1) {\n\t\t\tconsole.log('Multi touch!!!')\n\t\t\treturn\n\t\t}\n\n\t\t// User Config.touchBeMouse?\n\t\tevt.preventDefault();\n\t\t\n\t},\n\n});\n\nenableLayer(TouchSupportLayer)\n\nMorph.addMethods({\n\t// not used yet\n\tonTouchStart: Morph.prototype.onMouseDown,\n\tonTouchMove: Morph.prototype.onMouseMove,\n\tonTouchEnd: Morph.prototype.onMouseUp,\n\tonTouchCancel: Functions.Null,\n});\n\ncop.create(\"TouchMoveLayer\").\n\trefineClass(Morph, {\n\t\tonTouchStart: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch start ' + evt)\n\t\t},\n\t\tonTouchMove: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch move ' + evt)\n\t\t},\n\t\tonTouchEnd: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch end ' + evt)\n\t\t},\n\t\tonTouchCancel: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch cancel ' + evt)\n\t\t},\n});\nTouchMoveLayer.beGlobal();\n\n\ncop.create(\"LivelyPadLayer\")\n\t.refineClass(WorldMorph, {\n\t\tonEnter: function(proceed) {\n\t\t\tthis.world().setStatusMessage('loading finished', Color.green, 3)\n\t\t},\n});\nLivelyPadLayer.beGlobal();\n\n// not yet\nHandMorph.addMethods({\n\thandleTouch: function(evt) {\n\t\tconsole.log(\"handle touch 2\")\n\t\tconsole.log(\"try calling \" + evt.handlerName()) \n\t\tthis.lastMouseEvent = evt; \n\t\t// evt.mousePoint is the position if the touch that started the event\n\t\tthis.setPosition(evt.mousePoint);\n\t\n\t\tvar receiver = this.world().morphToReceiveEvent(evt);\n\t\tconsole.log(\"receiver \" +receiver) \n\n\t\n\t\ttry {\n\t\t\tconsole.log(\"calling \" + evt.handlerName() + \" on \" + receiver) \n\t\t\treceiver[evt.handlerName()].call(receiver, evt)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Touch event error: ' + e);\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n});\n\n\n\n}) // end of module"]]>109truetrue2000000 1 },\n\t\n\t// see http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/\n\ttouches: function() { return this.rawEvent.touches },\n\ttargetTouches: function() { return this.rawEvent.targetTouches },\n\tchangedTouches: function() { return this.rawEvent.changedTouches },\n\t\n});\n\n// overwrite default behavior\ncreateLayer('TouchSupportLayer')\nlayerClass(TouchSupportLayer, HandMorph, {\n\n\thandleEvent: function(proceed, rawEvt) {\n\t\tconsole.log(\"handle rawEvt\" + rawEvt);\n\t\tvar evt = new Event(rawEvt);\n\t\tevt.hand = this;\n\t\tif (evt.type.startsWith('Touch')) {\n\t\t\tthis.handleTouch(evt);\n\t\t\tevt.stopPropagation();\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// do default event dispatch\n\t\tevt = proceed(rawEvt);\n\n\t\tif (!evt.isTouchEvent()) return\n\n\t\t// dirty hack to invoke the soft keyboard\n\t\t// console.log(evt.type)\n\t\tif (evt.hand.mouseFocus && evt.hand.mouseFocus.constructor == TextMorph) \n\t\t\treturn\n\n\t\tif (rawEvt.changedTouches.length > 1) {\n\t\t\tconsole.log('Multi touch!!!')\n\t\t\treturn\n\t\t}\n\n\t\t// User Config.touchBeMouse?\n\t\tevt.preventDefault();\n\t\t\n\t},\n\n});\n\nenableLayer(TouchSupportLayer)\n\nMorph.addMethods({\n\t// not used yet\n\tonTouchStart: Morph.prototype.onMouseDown,\n\tonTouchMove: Morph.prototype.onMouseMove,\n\tonTouchEnd: Morph.prototype.onMouseUp,\n\tonTouchCancel: Functions.Null,\n});\n\ncop.create(\"TouchMoveLayer\").\n\trefineClass(Morph, {\n\t\tonTouchStart: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch start ' + evt)\n\t\t},\n\t\tonTouchMove: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch move ' + evt)\n\t\t},\n\t\tonTouchEnd: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch end ' + evt)\n\t\t},\n\t\tonTouchCancel: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch cancel ' + evt)\n\t\t},\n});\nTouchMoveLayer.beGlobal();\n\n\ncop.create(\"LivelyPadLayer\")\n\t.refineClass(WorldMorph, {\n\t\tonEnter: function(proceed) {\n\t\t\tthis.world().setStatusMessage('loading finished', Color.green, 3)\n\t\t},\n});\nLivelyPadLayer.beGlobal();\n\n// not yet\nHandMorph.addMethods({\n\thandleTouch: function(evt) {\n\t\tconsole.log(\"handle touch 2\")\n\t\tconsole.log(\"try calling \" + evt.handlerName()) \n\t\tthis.lastMouseEvent = evt; \n\t\t// evt.mousePoint is the position if the touch that started the event\n\t\tthis.setPosition(evt.mousePoint);\n\t\n\t\tvar receiver = this.world().morphToReceiveEvent(evt);\n\t\tconsole.log(\"receiver \" +receiver) \n\n\t\n\t\ttry {\n\t\t\tconsole.log(\"calling \" + evt.handlerName() + \" on \" + receiver) \n\t\t\treceiver[evt.handlerName()].call(receiver, evt)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Touch event error: ' + e);\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n});\n\n\n\n}) // end of module"]]> 1 },\n\t\n\t// see http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/\n\ttouches: function() { return this.rawEvent.touches },\n\ttargetTouches: function() { return this.rawEvent.targetTouches },\n\tchangedTouches: function() { return this.rawEvent.changedTouches },\n\t\n});\n\n// overwrite default behavior\ncreateLayer('TouchSupportLayer')\nlayerClass(TouchSupportLayer, HandMorph, {\n\n\thandleEvent: function(proceed, rawEvt) {\n\t\tconsole.log(\"handle rawEvt\" + rawEvt);\n\t\tvar evt = new Event(rawEvt);\n\t\tevt.hand = this;\n\t\tif (evt.type.startsWith('Touch')) {\n\t\t\tthis.handleTouch(evt);\n\t\t\tevt.stopPropagation();\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// do default event dispatch\n\t\tevt = proceed(rawEvt);\n\n\t\tif (!evt.isTouchEvent()) return\n\n\t\t// dirty hack to invoke the soft keyboard\n\t\t// console.log(evt.type)\n\t\tif (evt.hand.mouseFocus && evt.hand.mouseFocus.constructor == TextMorph) \n\t\t\treturn\n\n\t\tif (rawEvt.changedTouches.length > 1) {\n\t\t\tconsole.log('Multi touch!!!')\n\t\t\treturn\n\t\t}\n\n\t\t// User Config.touchBeMouse?\n\t\tevt.preventDefault();\n\t\t\n\t},\n\n});\n\nenableLayer(TouchSupportLayer)\n\nMorph.addMethods({\n\t// not used yet\n\tonTouchStart: Morph.prototype.onMouseDown,\n\tonTouchMove: Morph.prototype.onMouseMove,\n\tonTouchEnd: Morph.prototype.onMouseUp,\n\tonTouchCancel: Functions.Null,\n});\n\ncop.create(\"TouchMoveLayer\").\n\trefineClass(Morph, {\n\t\tonTouchStart: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch start ' + evt)\n\t\t},\n\t\tonTouchMove: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch move ' + evt)\n\t\t},\n\t\tonTouchEnd: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch end ' + evt)\n\t\t},\n\t\tonTouchCancel: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch cancel ' + evt)\n\t\t},\n});\nTouchMoveLayer.beGlobal();\n\n\ncop.create(\"LivelyPadLayer\")\n\t.refineClass(WorldMorph, {\n\t\tonEnter: function(proceed) {\n\t\t\tthis.world().setStatusMessage('loading finished', Color.green, 3)\n\t\t},\n});\nLivelyPadLayer.beGlobal();\n\n// not yet\nHandMorph.addMethods({\n\thandleTouch: function(evt) {\n\t\tconsole.log(\"handle touch 2\")\n\t\tconsole.log(\"try calling \" + evt.handlerName()) \n\t\tthis.lastMouseEvent = evt; \n\t\t// evt.mousePoint is the position if the touch that started the event\n\t\tthis.setPosition(evt.mousePoint);\n\t\n\t\tvar receiver = this.world().morphToReceiveEvent(evt);\n\t\tconsole.log(\"receiver \" +receiver) \n\n\t\n\t\ttry {\n\t\t\tconsole.log(\"calling \" + evt.handlerName() + \" on \" + receiver) \n\t\t\treceiver[evt.handlerName()].call(receiver, evt)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Touch event error: ' + e);\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n});\n\n\n\n}) // end of module"]]>truetrue
00.11truetruetrue
20null
truetruetruetrue
00.11truetruetrue
Addmodulefalsenulltruefalsetrue
Loadallfalsenulltruefalsetrue
LineNofalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
Evalonfalsenulltruefalsetrue
Sortfalsenulltruefalsetrue
Viewas...falsenulltruefalse
classesfalsenulltruefalsetruetruetrue
functionsfalsenulltruefalsetruetruetrue
objectsfalsenulltruefalsetruetruetrue
truetrue
null 1 },\n\t\n\t// see http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/\n\ttouches: function() { return this.rawEvent.touches },\n\ttargetTouches: function() { return this.rawEvent.targetTouches },\n\tchangedTouches: function() { return this.rawEvent.changedTouches },\n\t\n});\n\n// overwrite default behavior\ncreateLayer('TouchSupportLayer')\nlayerClass(TouchSupportLayer, HandMorph, {\n\n\thandleEvent: function(proceed, rawEvt) {\n\t\tconsole.log(\"handle rawEvt\" + rawEvt);\n\t\tvar evt = new Event(rawEvt);\n\t\tevt.hand = this;\n\t\tif (evt.type.startsWith('Touch')) {\n\t\t\tthis.handleTouch(evt);\n\t\t\tevt.stopPropagation();\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// do default event dispatch\n\t\tevt = proceed(rawEvt);\n\n\t\tif (!evt.isTouchEvent()) return\n\n\t\t// dirty hack to invoke the soft keyboard\n\t\t// console.log(evt.type)\n\t\tif (evt.hand.mouseFocus && evt.hand.mouseFocus.constructor == TextMorph) \n\t\t\treturn\n\n\t\tif (rawEvt.changedTouches.length > 1) {\n\t\t\tconsole.log('Multi touch!!!')\n\t\t\treturn\n\t\t}\n\n\t\t// User Config.touchBeMouse?\n\t\tevt.preventDefault();\n\t\t\n\t},\n\n});\n\nenableLayer(TouchSupportLayer)\n\nMorph.addMethods({\n\t// not used yet\n\tonTouchStart: Morph.prototype.onMouseDown,\n\tonTouchMove: Morph.prototype.onMouseMove,\n\tonTouchEnd: Morph.prototype.onMouseUp,\n\tonTouchCancel: Functions.Null,\n});\n\ncop.create(\"TouchMoveLayer\").\n\trefineClass(Morph, {\n\t\tonTouchStart: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch start ' + evt)\n\t\t},\n\t\tonTouchMove: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch move ' + evt)\n\t\t},\n\t\tonTouchEnd: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch end ' + evt)\n\t\t},\n\t\tonTouchCancel: function(proceed, evt) {\n\t\t\tthis.world().setStatusMessage('touch cancel ' + evt)\n\t\t},\n});\nTouchMoveLayer.beGlobal();\n\n\ncop.create(\"LivelyPadLayer\")\n\t.refineClass(WorldMorph, {\n\t\tonEnter: function(proceed) {\n\t\t\tthis.world().setStatusMessage('loading finished', Color.green, 3)\n\t\t},\n});\nLivelyPadLayer.beGlobal();\n\n// not yet\nHandMorph.addMethods({\n\thandleTouch: function(evt) {\n\t\tconsole.log(\"handle touch 2\")\n\t\tconsole.log(\"try calling \" + evt.handlerName()) \n\t\tthis.lastMouseEvent = evt; \n\t\t// evt.mousePoint is the position if the touch that started the event\n\t\tthis.setPosition(evt.mousePoint);\n\t\n\t\tvar receiver = this.world().morphToReceiveEvent(evt);\n\t\tconsole.log(\"receiver \" +receiver) \n\n\t\n\t\ttry {\n\t\t\tconsole.log(\"calling \" + evt.handlerName() + \" on \" + receiver) \n\t\t\treceiver[evt.handlerName()].call(receiver, evt)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Touch event error: ' + e);\n\t\t}\n\t\t\n\t\treturn true;\n\t},\n});\n\n\n\n}) // end of module"]]>nullnullfalsenullnullnullnullfalse
null71