mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix Tests.
This commit is contained in:
parent
55db305b10
commit
7f02ed5cf4
@ -19,9 +19,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -19,9 +19,7 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript"
|
||||||
|
src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
|
||||||
<script type="text/javascript" src="utils.js"></script>
|
<script type="text/javascript" src="utils.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function initialize(){
|
function initialize() {
|
||||||
web2d.peer.Toolkit.init();
|
web2d.peer.Toolkit.init();
|
||||||
var workspaceAttributes = { width:'700px',height:'100px',coordSize:'350 50',fillColor:'#ffffcc'};
|
var workspaceAttributes = { width:'700px',height:'100px',coordSize:'350 50',fillColor:'#ffffcc'};
|
||||||
var strokeWidthWorkspace = new web2d.Workspace(workspaceAttributes);
|
var strokeWidthWorkspace = new web2d.Workspace(workspaceAttributes);
|
||||||
@ -56,8 +56,7 @@
|
|||||||
rect.setPosition(250, 5);
|
rect.setPosition(250, 5);
|
||||||
strokeWidthWorkspace.appendChild(rect);
|
strokeWidthWorkspace.appendChild(rect);
|
||||||
|
|
||||||
for (var i = 0; i <= 10; i++)
|
for (var i = 0; i <= 10; i++) {
|
||||||
{
|
|
||||||
var line = new web2d.Line();
|
var line = new web2d.Line();
|
||||||
line.setFrom(5 + (i * 25), 5);
|
line.setFrom(5 + (i * 25), 5);
|
||||||
line.setTo(5 + (i * 25), 45);
|
line.setTo(5 + (i * 25), 45);
|
||||||
@ -69,8 +68,7 @@
|
|||||||
strokeWidthWorkspace.addItAsChildTo($("strokeWidthSample"));
|
strokeWidthWorkspace.addItAsChildTo($("strokeWidthSample"));
|
||||||
|
|
||||||
var strokeOpacityWorkspace = new web2d.Workspace(workspaceAttributes);
|
var strokeOpacityWorkspace = new web2d.Workspace(workspaceAttributes);
|
||||||
for (var i = 0; i < 10; i++)
|
for (var i = 0; i < 10; i++) {
|
||||||
{
|
|
||||||
var line = new web2d.Line();
|
var line = new web2d.Line();
|
||||||
line.setFrom(15 + (i * 25), 5);
|
line.setFrom(15 + (i * 25), 5);
|
||||||
line.setTo(3 + (i * 25), 45);
|
line.setTo(3 + (i * 25), 45);
|
||||||
@ -83,8 +81,7 @@
|
|||||||
|
|
||||||
var strokeStyleWorkspace = new web2d.Workspace(workspaceAttributes);
|
var strokeStyleWorkspace = new web2d.Workspace(workspaceAttributes);
|
||||||
var styles = ['solid','dot','dash','dashdot','longdash'];
|
var styles = ['solid','dot','dash','dashdot','longdash'];
|
||||||
for (var i = 0; i < styles.length; i++)
|
for (var i = 0; i < styles.length; i++) {
|
||||||
{
|
|
||||||
var line = new web2d.Line();
|
var line = new web2d.Line();
|
||||||
line.setFrom(25 + (i * 30), 5);
|
line.setFrom(25 + (i * 30), 5);
|
||||||
line.setTo(13 + (i * 30), 45);
|
line.setTo(13 + (i * 30), 45);
|
||||||
@ -97,8 +94,7 @@
|
|||||||
|
|
||||||
var strokeArrowWorkspace = new web2d.Workspace(workspaceAttributes);
|
var strokeArrowWorkspace = new web2d.Workspace(workspaceAttributes);
|
||||||
var styles = ['none ','block ','classic','diamond ','oval','open','chevron','doublechevron'];
|
var styles = ['none ','block ','classic','diamond ','oval','open','chevron','doublechevron'];
|
||||||
for (var i = 0; i < styles.length; i++)
|
for (var i = 0; i < styles.length; i++) {
|
||||||
{
|
|
||||||
var line = new web2d.Line();
|
var line = new web2d.Line();
|
||||||
line.setFrom(25 + (i * 30), 5);
|
line.setFrom(25 + (i * 30), 5);
|
||||||
line.setTo(13 + (i * 30), 45);
|
line.setTo(13 + (i * 30), 45);
|
||||||
@ -117,49 +113,49 @@
|
|||||||
<h1>Lines Render Tests </h1>
|
<h1>Lines Render Tests </h1>
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
<colgroup style="width:80%;">
|
<colgroup style="width:80%;">
|
||||||
<col style="width:30%"/>
|
<col style="width:30%"/>
|
||||||
<col style="width:60%"/>
|
<col style="width:60%"/>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Lines.
|
Lines.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="strokeWidthSample"/>
|
<div id="strokeWidthSample"/>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Lines Opacity.
|
Lines Opacity.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="strokeOpacitySample"/>
|
<div id="strokeOpacitySample"/>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Line Styles.
|
Line Styles.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="strokeStyleSample"/>
|
<div id="strokeStyleSample"/>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Line Arrows.
|
Line Arrows.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="strokeArrowSample"/>
|
<div id="strokeArrowSample"/>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript"
|
||||||
|
src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
@ -46,9 +46,9 @@
|
|||||||
<script type="text/javascript" src="utils.js"></script>
|
<script type="text/javascript" src="utils.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var xScale = 1000;
|
var xScale = 1000;
|
||||||
var yScale = 600;
|
var yScale = 600;
|
||||||
var shapeOrigX = 0;
|
var shapeOrigX = 0;
|
||||||
function initialize(){
|
function initialize() {
|
||||||
web2d.peer.Toolkit.init();
|
web2d.peer.Toolkit.init();
|
||||||
|
|
||||||
workspace = new web2d.Workspace();
|
workspace = new web2d.Workspace();
|
||||||
@ -58,8 +58,6 @@
|
|||||||
workspace.setFill("#f0f0f0");
|
workspace.setFill("#f0f0f0");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Center Topic Rect ...
|
// Center Topic Rect ...
|
||||||
centralRect = new web2d.Rect(0.3);
|
centralRect = new web2d.Rect(0.3);
|
||||||
centralRect.setSize(200, 60);
|
centralRect.setSize(200, 60);
|
||||||
@ -71,120 +69,111 @@
|
|||||||
workspace.addItAsChildTo($("divWorkspace"));
|
workspace.addItAsChildTo($("divWorkspace"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoomIn()
|
function zoomIn() {
|
||||||
{
|
xScale = xScale / 2;
|
||||||
xScale = xScale / 2;
|
yScale = yScale / 2;
|
||||||
yScale = yScale / 2;
|
workspace.setSize(xScale + "px", yScale + "px");
|
||||||
workspace.setSize(xScale + "px", yScale + "px");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function zoomOut()
|
function zoomOut() {
|
||||||
{
|
xScale = xScale * 2;
|
||||||
xScale = xScale * 2;
|
yScale = yScale * 2;
|
||||||
yScale = yScale * 2;
|
workspace.setSize(xScale + "px", yScale + "px");
|
||||||
workspace.setSize(xScale + "px", yScale + "px");
|
}
|
||||||
}
|
function createShape() {
|
||||||
function createShape()
|
// Secondary Idea...
|
||||||
{
|
var nodeGroup = new web2d.Group();
|
||||||
// Secondary Idea...
|
nodeGroup.setSize(200, 60);
|
||||||
var nodeGroup = new web2d.Group();
|
nodeGroup.setCoordSize(200, 60);
|
||||||
nodeGroup.setSize(200, 60);
|
nodeGroup.setPosition(700, shapeOrigX);
|
||||||
nodeGroup.setCoordSize(200, 60);
|
shapeOrigX = shapeOrigX + 50;
|
||||||
nodeGroup.setPosition(700, shapeOrigX);
|
|
||||||
shapeOrigX = shapeOrigX + 50;
|
|
||||||
|
|
||||||
var outerRect = new web2d.Rect();
|
var outerRect = new web2d.Rect();
|
||||||
outerRect.setSize(200, 100);
|
outerRect.setSize(200, 100);
|
||||||
outerRect.setVisibility(false);
|
outerRect.setVisibility(false);
|
||||||
outerRect.setPosition(0, 0);
|
outerRect.setPosition(0, 0);
|
||||||
outerRect.setFill("#3e9eff");
|
outerRect.setFill("#3e9eff");
|
||||||
outerRect.setStroke(1, 'solid', "#878b8f");
|
outerRect.setStroke(1, 'solid', "#878b8f");
|
||||||
nodeGroup.appendChild(outerRect);
|
nodeGroup.appendChild(outerRect);
|
||||||
|
|
||||||
var inerRect = new web2d.Rect(0.3);
|
var inerRect = new web2d.Rect(0.3);
|
||||||
inerRect.setSize(190, 85);
|
inerRect.setSize(190, 85);
|
||||||
inerRect.setPosition(5, 10);
|
inerRect.setPosition(5, 10);
|
||||||
inerRect.setFill("white");
|
inerRect.setFill("white");
|
||||||
inerRect.setStroke(1, 'dash', '#878b8f');
|
inerRect.setStroke(1, 'dash', '#878b8f');
|
||||||
nodeGroup.appendChild(inerRect);
|
nodeGroup.appendChild(inerRect);
|
||||||
nodeGroup._drag = false;
|
nodeGroup._drag = false;
|
||||||
|
|
||||||
workspace.appendChild(nodeGroup);
|
workspace.appendChild(nodeGroup);
|
||||||
|
|
||||||
// Add behaviour ...
|
// Add behaviour ...
|
||||||
inerRect.addEvent("mouseover", function() {
|
inerRect.addEvent("mouseover", function() {
|
||||||
outerRect.setVisibility(true);
|
outerRect.setVisibility(true);
|
||||||
});
|
});
|
||||||
inerRect.addEvent("mouseout", function() {
|
inerRect.addEvent("mouseout", function() {
|
||||||
if (!nodeGroup._drag)
|
if (!nodeGroup._drag) {
|
||||||
{
|
outerRect.setVisibility(false);
|
||||||
outerRect.setVisibility(false);
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
nodeGroup.addEvent("mousedown", function(e)
|
nodeGroup.addEvent("mousedown", function(e) {
|
||||||
{
|
var shadowGroup = new web2d.Group();
|
||||||
var shadowGroup = new web2d.Group();
|
shadowGroup.setSize(200, 60);
|
||||||
shadowGroup.setSize(200, 60);
|
shadowGroup.setCoordSize(200, 60);
|
||||||
shadowGroup.setCoordSize(200, 60);
|
|
||||||
|
|
||||||
var position = nodeGroup.getPosition();
|
var position = nodeGroup.getPosition();
|
||||||
shadowGroup.setPosition(position.x, position.y);
|
shadowGroup.setPosition(position.x, position.y);
|
||||||
|
|
||||||
var shadowRect = new web2d.Rect(0.3);
|
var shadowRect = new web2d.Rect(0.3);
|
||||||
shadowRect.setSize(190, 85);
|
shadowRect.setSize(190, 85);
|
||||||
shadowRect.setPosition(5, 10);
|
shadowRect.setPosition(5, 10);
|
||||||
shadowRect.setFill("white", 0.3);
|
shadowRect.setFill("white", 0.3);
|
||||||
shadowRect.setStroke(1, 'dash', '#878b8f');
|
shadowRect.setStroke(1, 'dash', '#878b8f');
|
||||||
shadowGroup.appendChild(shadowRect);
|
shadowGroup.appendChild(shadowRect);
|
||||||
|
|
||||||
workspace.appendChild(shadowGroup);
|
workspace.appendChild(shadowGroup);
|
||||||
|
|
||||||
this._shadowGroup = shadowGroup;
|
this._shadowGroup = shadowGroup;
|
||||||
if (!this._moveFunction)
|
if (!this._moveFunction) {
|
||||||
{
|
nodeGroup._drag = true;
|
||||||
nodeGroup._drag = true;
|
workspace._moveFunction = function(event) {
|
||||||
workspace._moveFunction = function(event)
|
// Esto mas o menos funciona por que el size del workspace es 1 a uno con
|
||||||
{
|
// el del la pantalla.
|
||||||
// Esto mas o menos funciona por que el size del workspace es 1 a uno con
|
var posx = 0;
|
||||||
// el del la pantalla.
|
var posy = 0;
|
||||||
var posx = 0;
|
if (event.pageX || event.pageY) {
|
||||||
var posy = 0;
|
posx = e.pageX;
|
||||||
if (event.pageX || event.pageY)
|
posy = e.pageY;
|
||||||
{
|
}
|
||||||
posx = e.pageX;
|
else if (event.clientX || event.clientY) {
|
||||||
posy = e.pageY;
|
posx = event.clientX + document.body.scrollLeft
|
||||||
}
|
+ document.documentElement.scrollLeft;
|
||||||
else if (event.clientX || event.clientY) {
|
posy = event.clientY + document.body.scrollTop
|
||||||
posx = event.clientX + document.body.scrollLeft
|
+ document.documentElement.scrollTop;
|
||||||
+ document.documentElement.scrollLeft;
|
}
|
||||||
posy = event.clientY + document.body.scrollTop
|
|
||||||
+ document.documentElement.scrollTop;
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowGroup.setPosition(posx - 50, posy - 150);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
workspace.addEvent("mousemove", workspace._moveFunction);
|
|
||||||
var mouseUp = function(e)
|
|
||||||
{
|
|
||||||
|
|
||||||
workspace.removeChild(shadowGroup);
|
|
||||||
|
|
||||||
var pos = shadowGroup.getPosition();
|
|
||||||
nodeGroup.setPosition(pos.x, pos.y);
|
|
||||||
nodeGroup._drag = false;
|
|
||||||
outerRect.setVisibility(true);
|
|
||||||
workspace.removeEvent("mousemove", workspace._moveFunction);
|
|
||||||
workspace.removeEvent("mouseup", mouseUp);
|
|
||||||
|
|
||||||
|
shadowGroup.setPosition(posx - 50, posy - 150);
|
||||||
};
|
};
|
||||||
workspace.addEvent("mouseup", mouseUp);
|
}
|
||||||
|
workspace.addEvent("mousemove", workspace._moveFunction);
|
||||||
|
var mouseUp = function(e) {
|
||||||
|
|
||||||
});
|
workspace.removeChild(shadowGroup);
|
||||||
|
|
||||||
}
|
var pos = shadowGroup.getPosition();
|
||||||
</script>
|
nodeGroup.setPosition(pos.x, pos.y);
|
||||||
|
nodeGroup._drag = false;
|
||||||
|
outerRect.setVisibility(true);
|
||||||
|
workspace.removeEvent("mousemove", workspace._moveFunction);
|
||||||
|
workspace.removeEvent("mouseup", mouseUp);
|
||||||
|
|
||||||
|
};
|
||||||
|
workspace.addEvent("mouseup", mouseUp);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body onload="initialize();">
|
<body onload="initialize();">
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript"
|
||||||
|
src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
@ -46,11 +46,10 @@
|
|||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
|
||||||
<script type="text/javascript" src="utils.js"></script>
|
<script type="text/javascript" src="utils.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function initialize(){
|
function initialize() {
|
||||||
web2d.peer.Toolkit.init();
|
web2d.peer.Toolkit.init();
|
||||||
|
|
||||||
var rectExampleTest = function ()
|
var rectExampleTest = function () {
|
||||||
{
|
|
||||||
var workspace = new web2d.Workspace();
|
var workspace = new web2d.Workspace();
|
||||||
workspace.setSize("100px", "100px");
|
workspace.setSize("100px", "100px");
|
||||||
workspace.setCoordSize(100, 100);
|
workspace.setCoordSize(100, 100);
|
||||||
@ -64,12 +63,9 @@
|
|||||||
}
|
}
|
||||||
rectExampleTest();
|
rectExampleTest();
|
||||||
|
|
||||||
var roundrectExampleTest = function ()
|
var roundrectExampleTest = function () {
|
||||||
{
|
function builder(container, x, width, height) {
|
||||||
function builder(container, x, width, height)
|
for (var i = 1; i <= 10; i++) {
|
||||||
{
|
|
||||||
for (var i = 1; i <= 10; i++)
|
|
||||||
{
|
|
||||||
var rect = new web2d.Rect(i / 10);
|
var rect = new web2d.Rect(i / 10);
|
||||||
rect.setPosition(x, ((i - 1) * (50 + 5)));
|
rect.setPosition(x, ((i - 1) * (50 + 5)));
|
||||||
rect.setSize(width, height);
|
rect.setSize(width, height);
|
||||||
|
@ -1,213 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<script type="text/javascript">
|
|
||||||
web2d = {
|
|
||||||
peer: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
web2d.peer =
|
|
||||||
{
|
|
||||||
svg: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
web2d.peer.utils = {};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/WorkspacePeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Toolkit.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Elipse.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElipsePeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Line.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/LinePeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/PolyLine.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/PolyLinePeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Group.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/GroupPeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Rect.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/RectPeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Text.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TextPeer.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/utils/TransformUtils.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/utils/EventUtils.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Font.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/Font.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TahomaFont.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/TimesFont.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ArialFont.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/VerdanaFont.js"></script>
|
|
||||||
<script type="text/javascript" src="utils.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function initialize(){
|
|
||||||
web2d.peer.Toolkit.init();
|
|
||||||
|
|
||||||
var overflowWorkspace = new web2d.Workspace({fillColor:'green'});
|
|
||||||
overflowWorkspace.setSize("100px", "100px");
|
|
||||||
|
|
||||||
var line = new web2d.RelationshipLine();
|
|
||||||
line.setTo(165, 165);
|
|
||||||
line.setFrom(95, 95);
|
|
||||||
line.setStyle("Straight");
|
|
||||||
line.setStroke('10');
|
|
||||||
overflowWorkspace.appendChild(line);
|
|
||||||
|
|
||||||
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, -1653.0000000000000000000001);
|
|
||||||
// line.setFrom(95, 952);
|
|
||||||
// line.setTo(165, 1651);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// var line = new web2d.PolyLine();
|
|
||||||
// line.setFrom(95, 90);
|
|
||||||
// line.setTo(160, 20);
|
|
||||||
// overflowWorkspace.appendChild(line);
|
|
||||||
//
|
|
||||||
// var line = new web2d.PolyLine();
|
|
||||||
// line.setStyle("Straight");
|
|
||||||
// line.setFrom(90, -90);
|
|
||||||
// line.setTo(20, 20);
|
|
||||||
// overflowWorkspace.appendChild(line);
|
|
||||||
//
|
|
||||||
// var line = new web2d.PolyLine();
|
|
||||||
// line.setFrom(95, 95);
|
|
||||||
// line.setTo(165, 165);
|
|
||||||
// line.setStroke(1, 'solid', 'red');
|
|
||||||
// overflowWorkspace.appendChild(line);
|
|
||||||
//
|
|
||||||
// // Reference ...
|
|
||||||
// var refLine = new web2d.Line();
|
|
||||||
// refLine.setFrom(95, 0);
|
|
||||||
// refLine.setTo(95, 200);
|
|
||||||
// refLine.setStroke(1, 'solid', 'red');
|
|
||||||
// overflowWorkspace.appendChild(refLine);
|
|
||||||
//
|
|
||||||
// var refLine = new web2d.Line();
|
|
||||||
// refLine.setFrom(165, 0);
|
|
||||||
// refLine.setTo(165, 200);
|
|
||||||
// refLine.setStroke(1, 'solid', 'red');
|
|
||||||
// overflowWorkspace.appendChild(refLine);
|
|
||||||
//
|
|
||||||
|
|
||||||
overflowWorkspace.addItAsChildTo($("overflowExample"));
|
|
||||||
|
|
||||||
|
|
||||||
var overflowWorkspace = new web2d.Workspace();
|
|
||||||
overflowWorkspace.setSize("100px", "100px");
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(95, 95);
|
|
||||||
line1.setTo(165, 165);
|
|
||||||
line1.setStyle("Curved");
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(95, 95);
|
|
||||||
line1.setTo(165, 135);
|
|
||||||
line1.setStyle("Curved");
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(95, 90);
|
|
||||||
line1.setTo(160, 20);
|
|
||||||
line1.setStyle("Straight");
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(95, 90);
|
|
||||||
line1.setTo(160, 50);
|
|
||||||
line1.setStyle("Straight");
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(90, 90);
|
|
||||||
line1.setTo(20, 20);
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(90, 90);
|
|
||||||
line1.setTo(20, 50);
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(90, 95);
|
|
||||||
line1.setTo(20, 165);
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
var line1 = new web2d.PolyLine();
|
|
||||||
line1.setFrom(90, 95);
|
|
||||||
line1.setTo(20, 135);
|
|
||||||
overflowWorkspace.appendChild(line1);
|
|
||||||
|
|
||||||
overflowWorkspace.addItAsChildTo($("multipleLineExample"));
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body onload="initialize();">
|
|
||||||
|
|
||||||
<h1>PolyLines Render Tests </h1>
|
|
||||||
|
|
||||||
<table border="1">
|
|
||||||
<colgroup style="width:80%;">
|
|
||||||
<col style="width:30%"/>
|
|
||||||
<col style="width:60%"/>
|
|
||||||
</colgroup>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Different types of PolyLines that can be used.
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div id="overflowExample"/>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
This is how multiple childs will look in each style line
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div id="multipleLineExample"/>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -15,9 +15,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
@ -1,171 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Modulue initializer.
|
|
||||||
web2d = {
|
|
||||||
peer: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
web2d.peer =
|
|
||||||
{
|
|
||||||
svg: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
web2d.peer.utils = {};
|
|
||||||
web2d.Loader =
|
|
||||||
{
|
|
||||||
load: function(scriptPath, stylePath, jsFileName, callbackFn)
|
|
||||||
{
|
|
||||||
var headElement = document.getElementsByTagName('head');
|
|
||||||
var htmlDoc = headElement.item(0);
|
|
||||||
var baseUrl = this.baseUrl(jsFileName);
|
|
||||||
this.files = scriptPath;
|
|
||||||
this.callbackFn = callbackFn;
|
|
||||||
|
|
||||||
if (scriptPath && scriptPath.length > 0)
|
|
||||||
{
|
|
||||||
for (var i = 0; i < scriptPath.length; i++)
|
|
||||||
{
|
|
||||||
var file = scriptPath[i];
|
|
||||||
this.includeScriptNode(baseUrl + file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
baseUrl: function(jsFileName)
|
|
||||||
{
|
|
||||||
var headElement = document.getElementsByTagName('head');
|
|
||||||
var htmlDoc = headElement.item(0);
|
|
||||||
var headChildren = htmlDoc.childNodes;
|
|
||||||
var result = null;
|
|
||||||
for (var i = 0; i < headChildren.length; i++)
|
|
||||||
{
|
|
||||||
var node = headChildren.item(i);
|
|
||||||
if (node.nodeName && node.nodeName.toLowerCase() == "script")
|
|
||||||
{
|
|
||||||
var libraryUrl = node.src;
|
|
||||||
if (libraryUrl.indexOf(jsFileName) != -1)
|
|
||||||
{
|
|
||||||
var index = libraryUrl.lastIndexOf("/");
|
|
||||||
index = libraryUrl.lastIndexOf("/", index - 1);
|
|
||||||
result = libraryUrl.substring(0, index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result == null)
|
|
||||||
{
|
|
||||||
throw "Could not obtain the base url directory.";
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
includeScriptNode: function(filename) {
|
|
||||||
var html_doc = document.getElementsByTagName('head').item(0);
|
|
||||||
var js = document.createElement('script');
|
|
||||||
js.setAttribute('language', 'javascript');
|
|
||||||
js.setAttribute('type', 'text/javascript');
|
|
||||||
js.setAttribute('src', filename);
|
|
||||||
|
|
||||||
function calltheCBcmn() {
|
|
||||||
web2d.Loader.checkLoaded(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(typeof(js.addEvent) != 'undefined') {
|
|
||||||
/* The FF, Chrome, Safari, Opera way */
|
|
||||||
js.addEvent('load',calltheCBcmn,false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* The MS IE 8+ way (may work with others - I dunno)*/
|
|
||||||
var ret = js.onreadystatechange= function handleIeState() {
|
|
||||||
if(js.readyState == 'loaded' || js.readyState == 'complete'){
|
|
||||||
calltheCBcmn();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
html_doc.appendChild(js);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
includeStyleNode: function(filename) {
|
|
||||||
var html_doc = document.getElementsByTagName('head').item(0);
|
|
||||||
var js = document.createElement('link');
|
|
||||||
js.setAttribute('rel', 'stylesheet');
|
|
||||||
js.setAttribute('type', 'text/css');
|
|
||||||
js.setAttribute('href', filename);
|
|
||||||
html_doc.appendChild(js);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
checkLoaded:function(name) {
|
|
||||||
var index = -1;
|
|
||||||
for(var i = 0 ; i<this.files.length; i++){
|
|
||||||
var names = this.files[i].split('/');
|
|
||||||
var chkname = name.split('/');
|
|
||||||
if(names[names.length-1]==chkname[chkname.length-1]){
|
|
||||||
index = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(i!=-1){
|
|
||||||
this.files.splice(i,1);
|
|
||||||
if(this.files.length==0){
|
|
||||||
this.callbackFn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
web2d.JsLoader =
|
|
||||||
{
|
|
||||||
scriptPath: [
|
|
||||||
"/render/mootools.js",
|
|
||||||
"../../../../../core-js/target/classes/core.js",
|
|
||||||
"/../../../src/main/javascript/EventDispatcher.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/ElementPeer.js",
|
|
||||||
"/../../../src/main/javascript/Element.js",
|
|
||||||
"/../../../src/main/javascript/Workspace.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/WorkspacePeer.js",
|
|
||||||
"/../../../src/main/javascript/Toolkit.js",
|
|
||||||
"/../../../src/main/javascript/Elipse.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/ElipsePeer.js",
|
|
||||||
"/../../../src/main/javascript/Line.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/LinePeer.js",
|
|
||||||
"/../../../src/main/javascript/PolyLine.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/PolyLinePeer.js",
|
|
||||||
"/../../../src/main/javascript/Group.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/GroupPeer.js",
|
|
||||||
"/../../../src/main/javascript/Rect.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/RectPeer.js",
|
|
||||||
"/../../../src/main/javascript/Text.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/TextPeer.js",
|
|
||||||
"/../../../src/main/javascript/peer/utils/TransformUtils.js",
|
|
||||||
"/../../../src/main/javascript/peer/utils/EventUtils.js",
|
|
||||||
"/../../../src/main/javascript/Font.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/Font.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/TahomaFont.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/TimesFont.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/ArialFont.js",
|
|
||||||
"/../../../src/main/javascript/peer/svg/VerdanaFont.js"],
|
|
||||||
|
|
||||||
stylePath: [],
|
|
||||||
load: function(callbackFn)
|
|
||||||
{
|
|
||||||
web2d.Loader.load(this.scriptPath, this.stylePath, "web2dLibraryLoader.js", callbackFn);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//web2d.JsLoader.load();
|
|
@ -16,9 +16,8 @@
|
|||||||
web2d.peer.utils = {};
|
web2d.peer.utils = {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="mootools.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js"></script>
|
||||||
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
<script type="text/javascript" src="../../../../../core-js/target/classes/core.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/EventDispatcher.js"></script>
|
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/peer/svg/ElementPeer.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Element.js"></script>
|
||||||
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
<script type="text/javascript" src="../../../../src/main/javascript/Workspace.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user