1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <title>Dojo parent constraint test</title>
5 <style type="text/css">
6 @import "../../resources/dojo.css";
14 border: 1px solid black;
22 border: 10px solid lightblue;
29 <script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true"></script>
30 <script type="text/javascript" src="../../dnd/move.js"></script>
31 <script type="text/javascript">
32 dojo.require("dojo.dnd.move");
34 var init = function(){
35 m1 = new dojo.dnd.move.parentConstrainedMoveable("moveable1", {area: "margin", within: true});
36 m2 = new dojo.dnd.move.parentConstrainedMoveable("moveable2", {area: "border", within: true});
37 m3 = new dojo.dnd.move.parentConstrainedMoveable("moveable3", {area: "padding", within: true});
38 m4 = new dojo.dnd.move.parentConstrainedMoveable("moveable4", {area: "content", within: true});
44 <h1>Dojo parent constraint test</h1>
45 <div class="parent" id="parent">
46 <div><strong>This is the parent element.</strong> All children will be restricted with <strong>within = true</strong>.</div>
47 <div class="moveable" id="moveable1">I am restricted within my parent's margins.</div>
48 <div class="moveable" id="moveable2">I am restricted within my parent's border.</div>
49 <div class="moveable" id="moveable3">I am restricted within my parent's paddings.</div>
50 <div class="moveable" id="moveable4">I am restricted within my parent's content.</div>