{
  "attachments": [],
  "comments_archived": true,
  "date": "2005-07-02T04:17:58.000Z",
  "layout": "post",
  "title": "Drag the boxes, stretch the lines",
  "wordpress_id": 664,
  "wordpress_slug": "drag-the-boxes-stretch-the-lines",
  "wordpress_url": "http://www.decafbad.com/blog/?p=664",
  "year": "2005",
  "month": "07",
  "day": "02",
  "isDir": false,
  "slug": "drag-the-boxes-stretch-the-lines",
  "type": "entry",
  "postName": "2005-07-02-drag-the-boxes-stretch-the-lines",
  "html": "<p><b>Update:</b> <i>A nice mention and ensuing discussion of this has appeared with <a href=\"http://lambda-the-ultimate.org/node/view/816\">this article at Lambda the Ultimate</a>.  I've killed trackback here due to spam, so I'm tossing this in manually.</i></p>\n<p>It's been awhile since I really sat down and tried knocking something out in the browser with JavaScript / DHTML.  There was that <a href=\"http://www.decafbad.com/blog/2005/06/08/greasemonkey_magic\">Greasemonkey thing</a> I did a little while ago, but that's not quite the same.</p>\n<p>So, I suddenly got an urge today to try making a mindmap-ish, boxes-and-lines chart out of some simple nested HTML lists using CSS and unobtrusive JavaScript.  I didn't get all that far toward the original goal--but during the course of exploring <a href=\"http://script.aculo.us/\">script.aculo.us</a>, <a href=\"http://prototype.conio.net/\">Prototype</a>, and <a href=\"http://ripcord.co.nz/behaviour/\">Behaviour,js</a> I came up with something that I think has potential.</p>\n<p>It's likely to only work on Firefox and Safari, but check it out and drag the boxes around:</p>\n<p><a href=\"http://www.decafbad.com/2005/06/map-test/\">http://www.decafbad.com/2005/06/map-test/</a></p>\n<p>View the source, steal anything worth theft, make fun of what's bad.  Oh yeah, and don't mind the ugly background images too much: They were just some random textures I picked out of The Gimp in order to see just how well the transparency on distorted PNGs worked.</p>\n<div id=\"comments\" class=\"comments archived-comments\"><h3>Archived Comments</h3>\n<ul class=\"comments\">\n<li class=\"comment\" id=\"comment-221085971\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://www.srijith.net/trinetre/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=22818a65c8482b1bf908c4b389e98e00&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://www.srijith.net/trinetre/\">Srijith</a>\n</div>\n\n\n<p><a href=\"#comment-221085971\" class=\"permalink\"><time datetime=\"2005-07-02T02:51:28\">2005-07-02T02:51:28</time></a></p>\n</div>\n\n\n<div class=\"content\">Nice.. small problem though. When I drag, say the green box, further up outside the scope of the box, the 'textarea' seems to expand, but in the wrong direction, towards the bottom. So, I still can't see the green box even if I use the slide bar.</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085972\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=f3794e603ef53b0513ab45b6565ee457&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"\">Jeremy Dunck</a>\n</div>\n\n\n<p><a href=\"#comment-221085972\" class=\"permalink\"><time datetime=\"2005-07-02T04:14:08\">2005-07-02T04:14:08</time></a></p>\n</div>\n\n\n<div class=\"content\">http://youngpup.net/2001/domdrag</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085973\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://dean.edwards.name/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=b33181b8e12bd10dfa373acc8af37cbb&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://dean.edwards.name/\">Dean Edwards</a>\n</div>\n\n\n<p><a href=\"#comment-221085973\" class=\"permalink\"><time datetime=\"2005-07-02T04:37:05\">2005-07-02T04:37:05</time></a></p>\n</div>\n\n\n<div class=\"content\">That's pretty damn cool.</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085974\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e338e5dbb0025cc84dc77943e05161c5&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"\">Quadsk8</a>\n</div>\n\n\n<p><a href=\"#comment-221085974\" class=\"permalink\"><time datetime=\"2005-07-02T11:54:50\">2005-07-02T11:54:50</time></a></p>\n</div>\n\n\n<div class=\"content\">This would make an interesting interface in combination with TiddlyWiki, an all in one file wiki, where the tiddlers (boxes with microcontent) have reference with each other. \nhttp://www.tiddlywiki.com/</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085975\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://www.sivas.com/aleene/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=eed7a2b3988f70c6451b1faa10b1547f&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://www.sivas.com/aleene/\">Arnaud Leene</a>\n</div>\n\n\n<p><a href=\"#comment-221085975\" class=\"permalink\"><time datetime=\"2005-07-03T12:34:58\">2005-07-03T12:34:58</time></a></p>\n</div>\n\n\n<div class=\"content\">Great. Works also in Omniweb 5.1.1 beta 2</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085977\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://www.slashdot.org/quantum+jim/journal/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e645caa8fd93b576fd371483009bf4d8&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://www.slashdot.org/quantum+jim/journal/\">Jimmy Cerra</a>\n</div>\n\n\n<p><a href=\"#comment-221085977\" class=\"permalink\"><time datetime=\"2005-07-03T19:28:17\">2005-07-03T19:28:17</time></a></p>\n</div>\n\n\n<div class=\"content\">Note: Use this to easily create usable and dynamic trails [1].\n[1] http://www.scottmccloud.com/comics/icst/icst-4/icst-4.html</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085979\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"http://donutage.org/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e32710f243aa4411cfa0a8e2865feace&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"http://donutage.org/\">William Cole</a>\n</div>\n\n\n<p><a href=\"#comment-221085979\" class=\"permalink\"><time datetime=\"2005-07-05T14:16:45\">2005-07-05T14:16:45</time></a></p>\n</div>\n\n\n<div class=\"content\">Very cool. Works in Camino 0.8.4, BTW.</div>\n\n\n</li>\n<li class=\"comment\" id=\"comment-221085980\">\n<div class=\"meta\">\n<div class=\"author\">\n<a class=\"avatar image\" rel=\"nofollow\" href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=b836d67476ef6ba4866e4c8eeea56c09&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\" width=\"\" height=\"\"></a>\n<a class=\"avatar name\" rel=\"nofollow\" href=\"\">DaveGarbutt</a>\n</div>\n\n\n<p><a href=\"#comment-221085980\" class=\"permalink\"><time datetime=\"2005-07-24T09:53:41\">2005-07-24T09:53:41</time></a></p>\n</div>\n\n\n<div class=\"content\">There is a Tiddlywiki with dragand drop of tiddlers.\nIt is the version done with ruby-on-rails and there is a free hosting site if you want to try it.\nSee http://www.serversidewiki.com/</div>\n\n\n</li>\n</ul>\n\n\n</div>\n\n\n",
  "body": "<b>Update:</b> <i>A nice mention and ensuing discussion of this has appeared with <a href=\"http://lambda-the-ultimate.org/node/view/816\">this article at Lambda the Ultimate</a>.  I've killed trackback here due to spam, so I'm tossing this in manually.</i>\r\n\r\nIt's been awhile since I really sat down and tried knocking something out in the browser with JavaScript / DHTML.  There was that [Greasemonkey thing][gm] I did a little while ago, but that's not quite the same.\r\n\r\nSo, I suddenly got an urge today to try making a mindmap-ish, boxes-and-lines chart out of some simple nested HTML lists using CSS and unobtrusive JavaScript.  I didn't get all that far toward the original goal--but during the course of exploring [script.aculo.us][s], [Prototype][p], and [Behaviour,js][b] I came up with something that I think has potential.\r\n\r\nIt's likely to only work on Firefox and Safari, but check it out and drag the boxes around:\r\n\r\n[http://www.decafbad.com/2005/06/map-test/](http://www.decafbad.com/2005/06/map-test/)\r\n\r\nView the source, steal anything worth theft, make fun of what's bad.  Oh yeah, and don't mind the ugly background images too much: They were just some random textures I picked out of The Gimp in order to see just how well the transparency on distorted PNGs worked.\r\n\r\n[gm]: http://www.decafbad.com/blog/2005/06/08/greasemonkey_magic\r\n[b]: http://ripcord.co.nz/behaviour/\r\n[p]: http://prototype.conio.net/\r\n[s]: http://script.aculo.us/\r\n\r\n<div id=\"comments\" class=\"comments archived-comments\">\r\n            <h3>Archived Comments</h3>\r\n            \r\n        <ul class=\"comments\">\r\n            \r\n        <li class=\"comment\" id=\"comment-221085971\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://www.srijith.net/trinetre/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=22818a65c8482b1bf908c4b389e98e00&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://www.srijith.net/trinetre/\">Srijith</a>\r\n                </div>\r\n                <a href=\"#comment-221085971\" class=\"permalink\"><time datetime=\"2005-07-02T02:51:28\">2005-07-02T02:51:28</time></a>\r\n            </div>\r\n            <div class=\"content\">Nice.. small problem though. When I drag, say the green box, further up outside the scope of the box, the 'textarea' seems to expand, but in the wrong direction, towards the bottom. So, I still can't see the green box even if I use the slide bar.</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085972\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=f3794e603ef53b0513ab45b6565ee457&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"\">Jeremy Dunck</a>\r\n                </div>\r\n                <a href=\"#comment-221085972\" class=\"permalink\"><time datetime=\"2005-07-02T04:14:08\">2005-07-02T04:14:08</time></a>\r\n            </div>\r\n            <div class=\"content\">http://youngpup.net/2001/domdrag</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085973\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://dean.edwards.name/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=b33181b8e12bd10dfa373acc8af37cbb&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://dean.edwards.name/\">Dean Edwards</a>\r\n                </div>\r\n                <a href=\"#comment-221085973\" class=\"permalink\"><time datetime=\"2005-07-02T04:37:05\">2005-07-02T04:37:05</time></a>\r\n            </div>\r\n            <div class=\"content\">That's pretty damn cool.</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085974\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e338e5dbb0025cc84dc77943e05161c5&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"\">Quadsk8</a>\r\n                </div>\r\n                <a href=\"#comment-221085974\" class=\"permalink\"><time datetime=\"2005-07-02T11:54:50\">2005-07-02T11:54:50</time></a>\r\n            </div>\r\n            <div class=\"content\">This would make an interesting interface in combination with TiddlyWiki, an all in one file wiki, where the tiddlers (boxes with microcontent) have reference with each other. \r\nhttp://www.tiddlywiki.com/</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085975\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://www.sivas.com/aleene/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=eed7a2b3988f70c6451b1faa10b1547f&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://www.sivas.com/aleene/\">Arnaud Leene</a>\r\n                </div>\r\n                <a href=\"#comment-221085975\" class=\"permalink\"><time datetime=\"2005-07-03T12:34:58\">2005-07-03T12:34:58</time></a>\r\n            </div>\r\n            <div class=\"content\">Great. Works also in Omniweb 5.1.1 beta 2</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085977\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://www.slashdot.org/quantum+jim/journal/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e645caa8fd93b576fd371483009bf4d8&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://www.slashdot.org/quantum+jim/journal/\">Jimmy Cerra</a>\r\n                </div>\r\n                <a href=\"#comment-221085977\" class=\"permalink\"><time datetime=\"2005-07-03T19:28:17\">2005-07-03T19:28:17</time></a>\r\n            </div>\r\n            <div class=\"content\">Note: Use this to easily create usable and dynamic trails [1].\r\n\r\n[1] http://www.scottmccloud.com/comics/icst/icst-4/icst-4.html</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085979\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"http://donutage.org/\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=e32710f243aa4411cfa0a8e2865feace&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"http://donutage.org/\">William Cole</a>\r\n                </div>\r\n                <a href=\"#comment-221085979\" class=\"permalink\"><time datetime=\"2005-07-05T14:16:45\">2005-07-05T14:16:45</time></a>\r\n            </div>\r\n            <div class=\"content\">Very cool. Works in Camino 0.8.4, BTW.</div>\r\n            \r\n        </li>\r\n    \r\n        <li class=\"comment\" id=\"comment-221085980\">\r\n            <div class=\"meta\">\r\n                <div class=\"author\">\r\n                    <a class=\"avatar image\" rel=\"nofollow\" \r\n                       href=\"\"><img src=\"http://www.gravatar.com/avatar.php?gravatar_id=b836d67476ef6ba4866e4c8eeea56c09&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png\"/></a>\r\n                    <a class=\"avatar name\" rel=\"nofollow\" \r\n                       href=\"\">DaveGarbutt</a>\r\n                </div>\r\n                <a href=\"#comment-221085980\" class=\"permalink\"><time datetime=\"2005-07-24T09:53:41\">2005-07-24T09:53:41</time></a>\r\n            </div>\r\n            <div class=\"content\">There is a Tiddlywiki with dragand drop of tiddlers.\r\n\r\nIt is the version done with ruby-on-rails and there is a free hosting site if you want to try it.\r\n\r\nSee http://www.serversidewiki.com/</div>\r\n            \r\n        </li>\r\n    \r\n        </ul>\r\n    \r\n        </div>\r\n    ",
  "parentPath": "./content/posts/archives/2005",
  "path": "2005/07/02/drag-the-boxes-stretch-the-lines",
  "needsBuild": true,
  "prevPostPath": "2005/06/28/building-a-proper-shared-syndication-feed-foundation",
  "prevPostTitle": "Building a proper shared syndication feed foundation",
  "nextPostPath": "2005/07/02/css-treemaps",
  "nextPostTitle": "Treemaps from unordered lists and CSS"
}