Changeset 247

User picture

Author: blaine

(2011/02/03 09:26) Over 1 year ago

buttons in embed diagrams and text improvments in the new version of the site

Affected files

Added canvasBox/default/download.php

Show contents

Added default/close.html

Show contents

Updated experimental/canvasBox/default/CanvasBox.js Download diff

246247
36
 * 
36
 * 
37
 * Get instance of canvas box by it's id
37
 * Get instance of canvas box by it's id
38
 * 
38
 * 
39
 * @param integer id
39
 * @param id integer
40
 */
40
 */
41
CanvasBox.Static.getCanvasBoxById = function getCanvasBoxById( id )
41
CanvasBox.Static.getCanvasBoxById = function getCanvasBoxById( id )
42
{
42
{
...
...
477
    clear: function clear()
477
    clear: function clear()
478
    {
478
    {
479
        var objContext = this.getContext();
479
        var objContext = this.getContext();
480
        objContext.clearRect( 0, 0, this.width, this.height );
480
        objContext.clearRect( 
481
            0,
482
            0,
483
            Math.max( this.width , this.defaultWidth ),
484
            Math.max( this.height , this.defaultHeight )
485
        );
481
    },
486
    },
482
487
483
    /**
488
    /**
...
...
1249
1254
1250
    saveFile: function saveFile()
1255
    saveFile: function saveFile()
1251
    {
1256
    {
1252
        this.objCanvasHtml.setAttribute( "width" ,  ( this.defaultWidth * 10 )  + "px" );
1257
        var dblProportion = this.defaultHeight / this.defaultWidth;
1253
        this.objCanvasHtml.setAttribute( "height" , ( this.defaultHeight * 10 ) + "px" );
1258
        var intWidth = 1000;
1259
        var intHeight = Math.round( intWidth * dblProportion );
1260
        var dblOldZoom = this.dblZoom;
1261
        var dblNewZoom = intWidth / this.defaultWidth;
1262
        this.objCanvasHtml.setAttribute( "width" ,  ( intWidth )  + "px" );
1263
        this.objCanvasHtml.setAttribute( "height" , ( intHeight ) + "px" );
1254
1264
1255
        this.dblZoom *= 10;
1265
        this.dblZoom = dblNewZoom;
1256
        
1266
        
1257
       var objNewForm = document.createElement( "form" );
1267
       var objNewForm = document.createElement( "form" );
1258
       var objNewTextArea = document.createElement( "textarea" );
1268
       var objNewTextArea = document.createElement( "textarea" );
...
...
1297
            30000
1307
            30000
1298
        );
1308
        );
1299
       document.body.removeChild( objNewForm );
1309
       document.body.removeChild( objNewForm );
1300
        this.dblZoom /= 10;
1310
        this.dblZoom = dblOldZoom;
1301
       this.objCanvasHtml.setAttribute( "width" ,  ( this.defaultWidth )  + "px" );
1311
       this.objCanvasHtml.setAttribute( "width" ,  ( this.defaultWidth )  + "px" );
1302
       this.objCanvasHtml.setAttribute( "height" , ( this.defaultHeight ) + "px" );
1312
       this.objCanvasHtml.setAttribute( "height" , ( this.defaultHeight ) + "px" );
1303
    },
1313
    },

Updated experimental/canvasBox/default/CanvasBoxFixedButton.js Download diff

246247
232
                }
232
                }
233
            }
233
            }
234
        }
234
        }
235
        this.x = this.objElement.x + this.intRelativeX + this.intPaddingLeft;
235
        this.x = this.intRelativeX + this.intPaddingLeft;
236
        this.y = this.objElement.y + this.intRelativeY + this.intPaddingTop;
236
        this.y = this.intRelativeY + this.intPaddingTop;
237
    },
237
    },
238
238
239
    drawOut: function drawOut()
239
    drawOut: function drawOut()

Updated public2/classDiagram.php Download diff

246247
81
                in this <a href="#classDiagramEditor.php">external example</a> or in the embedded example below.
81
                in this <a href="#classDiagramEditor.php">external example</a> or in the embedded example below.
82
            </p>
82
            </p>
83
            <p>
83
            <p>
84
                Actual implemented features:
84
                Already implemented features:
85
            </p>
85
            </p>
86
            <ul>
86
            <ul>
87
                <li>
87
                <li>
...
...
122
                <canvas id="canvasBox">
122
                <canvas id="canvasBox">
123
                </canvas>
123
                </canvas>
124
                <script type="text/javascript" charset="utf-8">
124
                <script type="text/javascript" charset="utf-8">
125
                    intWidth = document.getElementById("box").clientWidth;
125
                    objBox = new window.autoload.newCanvasBox( "canvasBox" ,
126
                    objBox = new window.autoload.newCanvasBox( "canvasBox" ,
126
                    document.getElementById("box").clientWidth, 700     );
127
                    intWidth , intWidth );
127
128
                    window.objBox = objBox;
128
                    var objClass = new window.autoload.newCanvasBoxClass();
129
                    var objClass = new window.autoload.newCanvasBoxClass();
129
                    objClass.objBehavior = new window.autoload.newCanvasBoxMagneticBehavior( objClass );
130
                    objClass.objBehavior = new window.autoload.newCanvasBoxDefaultBehavior( objClass );
130
                    objClass.x = 100;
131
                    objClass.x = Math.round( intWidth / 2 );
131
                    objClass.y = 100;
132
                    objClass.y = Math.round( intWidth / 2 );
132
                    objClass.strClassElementName = "example";
133
                    objClass.strClassElementName = "example";
133
                    objBox.addElement( objClass );
134
                    objBox.addElement( objClass );
134
                </script>
135
                </script>

Updated public2/codeInstrumentation.php Download diff

246247
65
                to be saved as XML, as a jpeg image and as XMI UML file.
65
                to be saved as XML, as a jpeg image and as XMI UML file.
66
            </p>
66
            </p>
67
            <p>
67
            <p>
68
                MISSING TEXT
68
                With the recent changes into the PHP, as namespaces, the code instrumentation
69
                need to be updated. Maybe this will take a big time because. Until then, try generate diagrams of projects what use this new
70
                features probably will fail. Another option more
71
                trustable, simple and fast it is the creation of diagrams based on the
72
                results of the XDebug. That is the reason because the creation of diagrams
73
                based on XDebug become one of the priority features.
69
            </p>
74
            </p>
70
            <p>
75
            <p>
71
                If you have some special case, when any of the avaliable printers and factorys
76
                <strong>The Diagram Generation With XDebug still is in working progress</strong>. You can help to accelerate
72
                solve your problem, everthing it is extremly well
73
                <a href="http://www.thiagomata.com/codetodiagram/doc/dox/html/">doc</a>
74
                to help
75
                to you create new classes and append new features.
76
            </p>
77
            <p>
78
                <strong>The Class Diagram generation still is in working progress</strong>. You can help to accelerate
79
                it making a <a href="#donation">donation</a>.
77
                it making a <a href="#donation">donation</a>.
80
            </p>
78
            </p>
81
        </div>
79
        </div>
82
    </div>
80
    </div>
83
    <div class="post">
81
    <div class="post">
84
        <p class="meta">
85
            <span class="subtopic"><a name="PHP Code to Sequence Diagram" href="codeInstrumentation.php#PHP Code to Sequence Diagram">PHP Code to Sequence Diagram</a></span>
86
            <span class="topic">Code Instrumentation</span>
87
        </p>
88
        <div style="clear: both;">&nbsp;</div>
89
        <div class="entry">
90
            <p>
91
                MISSING TEXT
92
            </p>
93
            <p>
94
                MISSING TEXT
95
            </p>
96
            <p>
97
                If you have some special case, when any of the avaliable printers and factorys
98
                solve your problem, everthing it is extremly well
99
                <a href="http://www.thiagomata.com/codetodiagram/doc/dox/html/">doc</a>
100
                to help
101
                to you create new classes and append new features.
102
            </p>
103
            <p>
104
                <strong>The Sequence Diagram generation still is in working progress</strong>. You can help to accelerate
105
                it making a <a href="#donation">donation</a>.
106
            </p>
107
        </div>
108
    </div>
109
    <div class="post">
110
        <h2 class="title"><a href="#">Limitations</a></h2>
82
        <h2 class="title"><a href="#">Limitations</a></h2>
111
        <p class="meta">
83
        <p class="meta">
112
            <span class="subtopic">Internet Explorer Output</span>
84
            <span class="subtopic">Internet Explorer Output</span>

Updated public2/index.php Download diff

246247
103
                </p>
103
                </p>
104
            </div>
104
            </div>
105
            <script type="text/javascript" charset="utf-8">
105
            <script type="text/javascript" charset="utf-8">
106
                var objBox = new window.autoload.newCanvasBoxStateDiagram( "abc" , document.body.clientWidth / 3 , 450 );
106
                var intWidth = Math.round( document.body.clientWidth / 3 );
107
                var intHeight = Math.round(  intWidth * 1.15 );
108
                var dblProportion =  intWidth / 400;
109
                var objBox = new window.autoload.newCanvasBoxStateDiagram( "abc" , intWidth , intHeight );
107
                window.box = objBox;
110
                window.box = objBox;
108
                function addStateElement( color )
111
                function addStateElement( color )
109
                {
112
                {
...
...
140
                }
143
                }
141
                var objFactoryFromXml = addStateElement(  );
144
                var objFactoryFromXml = addStateElement(  );
142
                objFactoryFromXml.strStateName = "Factory From Xml";
145
                objFactoryFromXml.strStateName = "Factory From Xml";
143
                objFactoryFromXml.x = 70;
146
                objFactoryFromXml.x = 70 * dblProportion;
144
                objFactoryFromXml.y = 80;
147
                objFactoryFromXml.y = 80 * dblProportion;
145
148
146
                var objFactoryFromCode = addStateElement(  );
149
                var objFactoryFromCode = addStateElement(  );
147
                objFactoryFromCode.strStateName = "Factory From Code";
150
                objFactoryFromCode.strStateName = "Factory From Code";
148
                objFactoryFromCode.x = 330;
151
                objFactoryFromCode.x = 330 * dblProportion;
149
                objFactoryFromCode.y = 80;
152
                objFactoryFromCode.y = 80 * dblProportion;
150
153
151
                var objDiagram = addStateElement( "rgb(200,200,230)" );
154
                var objDiagram = addStateElement( "rgb(200,200,230)" );
152
                objDiagram.strStateName = "Uml Diagram";
155
                objDiagram.strStateName = "Uml Diagram";
153
                objDiagram.x = 200;
156
                objDiagram.x = 200 * dblProportion;
154
                objDiagram.y = 200;
157
                objDiagram.y = 200 * dblProportion;
155
158
156
                var objPrinterHtml = addStateElement( );
159
                var objPrinterHtml = addStateElement( );
157
                objPrinterHtml.strStateName = "Printer Html";
160
                objPrinterHtml.strStateName = "Printer Html";
158
                objPrinterHtml.x = 100;
161
                objPrinterHtml.x = 100 * dblProportion;
159
                objPrinterHtml.y = 350;
162
                objPrinterHtml.y = 350 * dblProportion;
160
163
161
                var objPrinterXml = addStateElement( );
164
                var objPrinterXml = addStateElement( );
162
                objPrinterXml.strStateName = "Printer Xml";
165
                objPrinterXml.strStateName = "Printer Xml";
163
                objPrinterXml.x = 200;
166
                objPrinterXml.x = 200 * dblProportion;
164
                objPrinterXml.y = 400;
167
                objPrinterXml.y = 400 * dblProportion;
165
168
166
                var objPrinterPng = addStateElement( );
169
                var objPrinterPng = addStateElement( );
167
                objPrinterPng.strStateName = "Printer Png";
170
                objPrinterPng.strStateName = "Printer Png";
168
                objPrinterPng.x = 300;
171
                objPrinterPng.x = 300 * dblProportion;
169
                objPrinterPng.y = 350;
172
                objPrinterPng.y = 350 * dblProportion;
170
173
171
        var objLine;
174
        var objLine;
172
        objLine = addLine( objFactoryFromXml , objDiagram );
175
        objLine = addLine( objFactoryFromXml , objDiagram );

Updated public2/sequenceDiagram.php Download diff

246247
356
                We welcome anyone with the patience and desire to make the
356
                We welcome anyone with the patience and desire to make the
357
                CSS changes need for it to work on Internet Explorer.
357
                CSS changes need for it to work on Internet Explorer.
358
            </p>
358
            </p>
359
            <p>
360
                The Sequence Diagram should migrate from HTML with CSS to Canvas Box
361
                what the <a href="classDiagram.php">Class Diagram</a> already is using. This should make more easy
362
                interaction events as drag and drop, save as image, etc. So big changes
363
                are comming to the Sequence Diagram Web Editor.
364
            </p>
359
        </div>
365
        </div>
360
        <p class="meta">
366
        <p class="meta">
361
            <span class="subtopic">Under Development</span>
367
            <span class="subtopic">Under Development</span>