Tiny PLWidget

This is what happens when you don’t sleep. Tiny PLWidget, finally running, and soon to be unleashed.


I spent almost a week trying to figure out how to stop the widget from being dragged across the screen when the mouse was down and traveling through the drawing canvas. Conjectures and advice pointed me to look for some javascript event logic error, potentially caused by a conflict between the DOM event implementation, and the Apple Dashblard event implementation. However, after 33.27 (base 60) hours of not sleeping and working with the PLW Cannibals on our one night project for the Media Lab prototype-a-thon competition, I figured out I just needed to define one CSS parameter called -apple-dashboard-region on the div ID I didn’t want to have dragged. The code on the CSS would look like this:

#canvas {
	width: 13em;
	height: 13em;
	margin-left: 1em;
	position: relative;
	border-width: 1px;
	border-style: solid;
	border-color: rgb(204, 204, 204);
	margin-bottom: 1.4em;
	-apple-dashboard-region: dashboard-region(control rectangle);

This defines a rectangular region where the widget will not be dragged across the dashboard, letting you concentrate on making drawings, or other things.

Leave a Reply