diff --git a/README.md b/README.md index bfee8d2..c86d710 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ To better understand how ChiliPeppr's publish() method works see amplify.js's do - (No signals defined in this workspace) + /com-chilipeppr-workspace-bastianf2/com-chilipeppr-elem-dragdrop/ondragoverThe Chilipeppr drag drop element will publish on channel /com-chilipeppr-elem-dragdrop/ondropped when a file is dropped so we subscribe to it so we can load a Gcode file when the user drags it onto the browser. It also adds a hover class to the bound DOM elem so we can add a CSS to hilite on hover/com-chilipeppr-workspace-bastianf2/com-chilipeppr-elem-dragdrop/ondragleaveWe need to know when the drag is over to remove the CSS hilites./com-chilipeppr-workspace-bastianf2/com-chilipeppr-widget-gcode/resizeWe watch if the Gcode viewer resizes so that we can reposition or resize other elements in the workspace. Specifically we ask the Serial Port Console to resize. We also redraw the 3D Viewer so it fills the whole screen. @@ -135,7 +135,7 @@ The table below shows, in order, the methods and properties inside the workspace - idstring"com-chilipeppr-workspace-bastianf2"

The ID of the widget. You must define this and make it unique.namestring"Workspace / bastianf2"descstring"A ChiliPeppr Workspace bastianf2."urlstring"http://raw.githubusercontent.com/bastian-f/workspace-bastianf2/master/auto-generated-workspace.html"fiddleurlstring"http://ide.c9.io/bastianf/chillipeppr-test-2"githuburlstring"http://github.com/bastian-f/workspace-bastianf2"testurlstring"http://chillipeppr-test-2-bastianf.c9users.io/workspace.html"widgetConsoleobjectContains reference to the Console widget object. Hang onto the reference + idstring"com-chilipeppr-workspace-bastianf2"

The ID of the widget. You must define this and make it unique.namestring"Workspace / bastianf2"descstring"A ChiliPeppr Workspace bastianf2."urlstring"http://raw.githubusercontent.com/bastian-f/workspace-bastianf2/master/auto-generated-workspace.html"fiddleurlstring"http://ide.c9.io/bastianf/chillipeppr-test-2"githuburlstring"http://github.com/bastian-f/workspace-bastianf2"testurlstring"http://chillipeppr-test-2-bastianf.c9users.io/workspace.html"foreignSubscribeobjectPlease see docs above.widgetConsoleobjectContains reference to the Console widget object. Hang onto the reference so we can resize it when the window resizes because we want it to manually resize to fill the height of the browser so it looks clean.widgetSpjsobjectContains reference to the Serial Port JSON Server object.initfunctionfunction ()

The workspace's init method. It loads the all the widgets contained in the workspace and inits them.getBillboardfunctionfunction ()

Returns the billboard HTML, CSS, and Javascript for this Workspace. The billboard diff --git a/auto-generated-workspace.html b/auto-generated-workspace.html index a793d13..3481c27 100644 --- a/auto-generated-workspace.html +++ b/auto-generated-workspace.html @@ -137,6 +137,11 @@ fiddleurl: "http://ide.c9.io/bastianf/chillipeppr-test-2", // The edit URL. This can be auto-filled by runme.js in Cloud9 if you'd like, or just define it on your own to help people know where they can edit/fork your widget githuburl: "http://github.com/bastian-f/workspace-bastianf2", // The backing github repo testurl: "http://chillipeppr-test-2-bastianf.c9users.io/workspace.html", // The standalone working widget so can view it working by itself + foreignSubscribe: { + "/com-chilipeppr-elem-dragdrop/ondragover": "The Chilipeppr drag drop element will publish on channel /com-chilipeppr-elem-dragdrop/ondropped when a file is dropped so we subscribe to it so we can load a Gcode file when the user drags it onto the browser. It also adds a hover class to the bound DOM elem so we can add a CSS to hilite on hover", + "/com-chilipeppr-elem-dragdrop/ondragleave": "We need to know when the drag is over to remove the CSS hilites.", + "/com-chilipeppr-widget-gcode/resize": "We watch if the Gcode viewer resizes so that we can reposition or resize other elements in the workspace. Specifically we ask the Serial Port Console to resize. We also redraw the 3D Viewer so it fills the whole screen." +}, /** * Contains reference to the Console widget object. Hang onto the reference * so we can resize it when the window resizes because we want it to manually diff --git a/workspace.js b/workspace.js index 2144e56..372118d 100644 --- a/workspace.js +++ b/workspace.js @@ -45,6 +45,11 @@ cpdefine("inline:com-chilipeppr-workspace-bastianf2", ["chilipeppr_ready"], func fiddleurl: "(auto fill by runme.js)", // The edit URL. This can be auto-filled by runme.js in Cloud9 if you'd like, or just define it on your own to help people know where they can edit/fork your widget githuburl: "(auto fill by runme.js)", // The backing github repo testurl: "(auto fill by runme.js)", // The standalone working widget so can view it working by itself + foreignSubscribe: { + "/com-chilipeppr-elem-dragdrop/ondragover": "The Chilipeppr drag drop element will publish on channel /com-chilipeppr-elem-dragdrop/ondropped when a file is dropped so we subscribe to it so we can load a Gcode file when the user drags it onto the browser. It also adds a hover class to the bound DOM elem so we can add a CSS to hilite on hover", + "/com-chilipeppr-elem-dragdrop/ondragleave": "We need to know when the drag is over to remove the CSS hilites.", + "/com-chilipeppr-widget-gcode/resize": "We watch if the Gcode viewer resizes so that we can reposition or resize other elements in the workspace. Specifically we ask the Serial Port Console to resize. We also redraw the 3D Viewer so it fills the whole screen." +}, /** * Contains reference to the Console widget object. Hang onto the reference * so we can resize it when the window resizes because we want it to manually