1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\r
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
\r
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
\r
5 <meta http-equiv="Content-Language" content="en-us" />
\r
6 <title>CSS - Float test</title>
\r
7 <script src="../lib/prototype.js" type="text/javascript"></script>
\r
8 <script src="../lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
\r
9 <script src="../cropper.js" type="text/javascript"></script>
\r
12 <script type="text/javascript" charset="utf-8">
\r
14 // setup the callback function
\r
15 function onEndCrop( coords, dimensions ) {
\r
16 $( 'x1' ).value = coords.x1;
\r
17 $( 'y1' ).value = coords.y1;
\r
18 $( 'x2' ).value = coords.x2;
\r
19 $( 'y2' ).value = coords.y2;
\r
20 $( 'width' ).value = dimensions.width;
\r
21 $( 'height' ).value = dimensions.height;
\r
32 onEndCrop: function( coords, dimensions ) {
\r
33 $( 'floatX1' ).value = coords.x1;
\r
34 $( 'floatY1' ).value = coords.y1;
\r
35 $( 'floatX2' ).value = coords.x2;
\r
36 $( 'floatY2' ).value = coords.y2;
\r
37 $( 'floatWidth' ).value = dimensions.width;
\r
38 $( 'floatHeight' ).value = dimensions.height;
\r
45 if( typeof(dump) != 'function' ) {
\r
46 Debug.init(true, '/');
\r
48 function dump( msg ) {
\r
51 } else dump( '---------------------------------------\n' );
\r
55 <link rel="stylesheet" type="text/css" href="debug.css" media="all" />
\r
56 <style type="text/css">
\r
69 margin: 20px 0 0 50px; /* Just while testing, to make sure we return the correct positions for the image & not the window */
\r
75 background-color: #eee;
\r
76 border: 3px solid #000;
\r
84 <h2>Test page with floating wrapper</h2>
\r
86 Some test content before the image
\r
89 <div id="test-float">
\r
91 <div id="testFloatWrap">
\r
92 <img src="castle.jpg" alt="test image" id="testFloatImage" width="500" height="333" />
\r
96 <label for="floatX1">x1:</label>
\r
97 <input type="text" name="floatX1" id="floatX1" />
\r
100 <label for="floatY1">y1:</label>
\r
101 <input type="text" name="floatY1" id="floatY1" />
\r
104 <label for="floatX2">x2:</label>
\r
105 <input type="text" name="floatX2" id="floatX2" />
\r
108 <label for="floatY2">y2:</label>
\r
109 <input type="text" name="floatY2" id="floatY2" />
\r
112 <label for="floatWidth">width:</label>
\r
113 <input type="text" name="floatWidth" id="floatWidth" />
\r
116 <label for="floatHeight">height</label>
\r
117 <input type="text" name="floatHeight" id="floatHeight" />
\r