Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F884066
test_parent_constraints.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
test_parent_constraints.html
View Options
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>
Dojo parent constraint test
</
title
>
<
style
type
=
"text/css"
>
@
import
"../../resources/dojo.css"
;
body
{
padding
:
1
em
;
}
.
moveable
{
background
:
#FFFFBF
;
border
:
1
px
solid
black
;
width
:
300
px
;
padding
:
10
px
20
px
;
cursor
:
pointer
;
}
.
parent
{
background
:
#BFECFF
;
border
:
10
px
solid
lightblue
;
width
:
500
px
;
height
:
500
px
;
padding
:
10
px
;
margin
:
10
px
;
}
</
style
>
<
script
type
=
"text/javascript"
src
=
"../../dojo.js"
djConfig
=
"isDebug: true"
></
script
>
<
script
type
=
"text/javascript"
src
=
"../../dnd/move.js"
></
script
>
<
script
type
=
"text/javascript"
>
dojo
.
require
(
"dojo.dnd.move"
);
var
m1
,
m2
,
m3
,
m4
;
var
init
=
function
(){
m1
=
new
dojo
.
dnd
.
move
.
parentConstrainedMoveable
(
"moveable1"
,
{
area
:
"margin"
,
within
:
true
});
m2
=
new
dojo
.
dnd
.
move
.
parentConstrainedMoveable
(
"moveable2"
,
{
area
:
"border"
,
within
:
true
});
m3
=
new
dojo
.
dnd
.
move
.
parentConstrainedMoveable
(
"moveable3"
,
{
area
:
"padding"
,
within
:
true
});
m4
=
new
dojo
.
dnd
.
move
.
parentConstrainedMoveable
(
"moveable4"
,
{
area
:
"content"
,
within
:
true
});
};
dojo
.
addOnLoad
(
init
);
</
script
>
</
head
>
<
body
>
<
h1
>
Dojo parent constraint test
</
h1
>
<
div
class
=
"parent"
id
=
"parent"
>
<
div
><
strong
>
This is the parent element.
</
strong
>
All children will be restricted with
<
strong
>
within = true
</
strong
>
.
</
div
>
<
div
class
=
"moveable"
id
=
"moveable1"
>
I am restricted within my parent's margins.
</
div
>
<
div
class
=
"moveable"
id
=
"moveable2"
>
I am restricted within my parent's border.
</
div
>
<
div
class
=
"moveable"
id
=
"moveable3"
>
I am restricted within my parent's paddings.
</
div
>
<
div
class
=
"moveable"
id
=
"moveable4"
>
I am restricted within my parent's content.
</
div
>
</
div
>
</
body
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sun, Apr 6, 10:24 (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23286
Default Alt Text
test_parent_constraints.html (1 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment