mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-01 18:04:58 +01:00
Replace document.id by Jquery $
This commit is contained in:
parent
d3087a6626
commit
4c2d335a2b
@ -79,7 +79,7 @@
|
|||||||
line.setStroke("blue");
|
line.setStroke("blue");
|
||||||
group.append(line);
|
group.append(line);
|
||||||
|
|
||||||
workspace.addItAsChildTo(document.id("groupBasicContainer"));
|
workspace.addItAsChildTo($('#groupBasicContainer'));
|
||||||
|
|
||||||
|
|
||||||
var xDir = 1;
|
var xDir = 1;
|
||||||
@ -140,7 +140,7 @@
|
|||||||
elipseLeft.addEvent("click", listener);
|
elipseLeft.addEvent("click", listener);
|
||||||
elipseRight.addEvent("click", listener);
|
elipseRight.addEvent("click", listener);
|
||||||
|
|
||||||
workspace.addItAsChildTo(document.id("groupEventsContainer"));
|
workspace.addItAsChildTo($('#groupEventsContainer'));
|
||||||
}
|
}
|
||||||
eventTest();
|
eventTest();
|
||||||
|
|
||||||
@ -200,7 +200,7 @@
|
|||||||
line.setStroke("blue");
|
line.setStroke("blue");
|
||||||
groupInner.append(line);
|
groupInner.append(line);
|
||||||
|
|
||||||
workspace.addItAsChildTo(document.id("groupNestedContainer"));
|
workspace.addItAsChildTo($('#groupNestedContainer'));
|
||||||
};
|
};
|
||||||
eventTest();
|
eventTest();
|
||||||
|
|
||||||
@ -236,13 +236,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var sample100x100 = groupSampleBuilder(100, 100);
|
var sample100x100 = groupSampleBuilder(100, 100);
|
||||||
sample100x100.addItAsChildTo(document.id("coordsizeExample100x100"));
|
sample100x100.addItAsChildTo($("#coordsizeExample100x100"));
|
||||||
|
|
||||||
var sample100x200 = groupSampleBuilder(100, 200);
|
var sample100x200 = groupSampleBuilder(100, 200);
|
||||||
sample100x200.addItAsChildTo(document.id("coordsizeExample100x200"));
|
sample100x200.addItAsChildTo($("#coordsizeExample100x200"));
|
||||||
|
|
||||||
var sample200x100 = groupSampleBuilder(200, 100);
|
var sample200x100 = groupSampleBuilder(200, 100);
|
||||||
sample200x100.addItAsChildTo(document.id("coordsizeExample200x100"));
|
sample200x100.addItAsChildTo($("#coordsizeExample200x100"));
|
||||||
};
|
};
|
||||||
workspaceCoordSizeSample();
|
workspaceCoordSizeSample();
|
||||||
|
|
||||||
@ -279,13 +279,13 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
var sample0x0 = groupSampleBuilder(0, 0);
|
var sample0x0 = groupSampleBuilder(0, 0);
|
||||||
sample0x0.addItAsChildTo(document.id("coordOriginExample0x0"));
|
sample0x0.addItAsChildTo($("#coordOriginExample0x0"));
|
||||||
|
|
||||||
var sample100x200 = groupSampleBuilder(0, 50);
|
var sample100x200 = groupSampleBuilder(0, 50);
|
||||||
sample100x200.addItAsChildTo(document.id("coordOriginExample0x50"));
|
sample100x200.addItAsChildTo($("#coordOriginExample0x50"));
|
||||||
|
|
||||||
var sample200x100 = groupSampleBuilder(50, 0);
|
var sample200x100 = groupSampleBuilder(50, 0);
|
||||||
sample200x100.addItAsChildTo(document.id("coordOriginExample50x0"));
|
sample200x100.addItAsChildTo($("#coordOriginExample50x0"));
|
||||||
}
|
}
|
||||||
workspaceCoordOriginSample();
|
workspaceCoordOriginSample();
|
||||||
|
|
||||||
@ -328,7 +328,7 @@
|
|||||||
group.setVisibility(isVisible);
|
group.setVisibility(isVisible);
|
||||||
};
|
};
|
||||||
executer.periodical(100);
|
executer.periodical(100);
|
||||||
workspace.addItAsChildTo(document.id("visibilityExample"));
|
workspace.addItAsChildTo($('#visibilityExample'));
|
||||||
|
|
||||||
}
|
}
|
||||||
groupVisibilitySample();
|
groupVisibilitySample();
|
||||||
@ -366,7 +366,7 @@
|
|||||||
group.setCoordSize(width, height);
|
group.setCoordSize(width, height);
|
||||||
};
|
};
|
||||||
executer.periodical(100);
|
executer.periodical(100);
|
||||||
workspace.addItAsChildTo(document.id("scaleStrokeExample"));
|
workspace.addItAsChildTo($('#scaleStrokeExample'));
|
||||||
|
|
||||||
}
|
}
|
||||||
groupVisibilitySample();
|
groupVisibilitySample();
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
strokeWidthWorkspace.append(rect);
|
strokeWidthWorkspace.append(rect);
|
||||||
|
|
||||||
strokeWidthWorkspace.addItAsChildTo(document.id("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++) {
|
||||||
@ -78,7 +78,7 @@
|
|||||||
line.setAttribute('strokeColor', 'red');
|
line.setAttribute('strokeColor', 'red');
|
||||||
strokeOpacityWorkspace.append(line);
|
strokeOpacityWorkspace.append(line);
|
||||||
}
|
}
|
||||||
strokeOpacityWorkspace.addItAsChildTo(document.id("strokeOpacitySample"));
|
strokeOpacityWorkspace.addItAsChildTo($('#strokeOpacitySample'));
|
||||||
|
|
||||||
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'];
|
||||||
@ -91,7 +91,7 @@
|
|||||||
line.setAttribute('strokeStyle', styles[i]);
|
line.setAttribute('strokeStyle', styles[i]);
|
||||||
strokeStyleWorkspace.append(line);
|
strokeStyleWorkspace.append(line);
|
||||||
}
|
}
|
||||||
strokeStyleWorkspace.addItAsChildTo(document.id("strokeStyleSample"));
|
strokeStyleWorkspace.addItAsChildTo($('#strokeStyleSample'));
|
||||||
|
|
||||||
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'];
|
||||||
@ -104,7 +104,7 @@
|
|||||||
line.setArrowStyle(styles[i]);
|
line.setArrowStyle(styles[i]);
|
||||||
strokeArrowWorkspace.append(line);
|
strokeArrowWorkspace.append(line);
|
||||||
}
|
}
|
||||||
strokeArrowWorkspace.addItAsChildTo(document.id("strokeArrowSample"));
|
strokeArrowWorkspace.addItAsChildTo($('#strokeArrowSample'));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
// overflowWorkspace.append(refLine);
|
// overflowWorkspace.append(refLine);
|
||||||
//
|
//
|
||||||
|
|
||||||
overflowWorkspace.addItAsChildTo(document.id("overflowExample"));
|
overflowWorkspace.addItAsChildTo($('#overflowExample'));
|
||||||
|
|
||||||
|
|
||||||
var overflowWorkspace = new web2d.Workspace();
|
var overflowWorkspace = new web2d.Workspace();
|
||||||
@ -177,7 +177,7 @@
|
|||||||
line1.setTo(20, 135);
|
line1.setTo(20, 135);
|
||||||
overflowWorkspace.append(line1);
|
overflowWorkspace.append(line1);
|
||||||
|
|
||||||
overflowWorkspace.addItAsChildTo(document.id("multipleLineExample"));
|
overflowWorkspace.addItAsChildTo($('#multipleLineExample'));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
centralRect.setStroke(1, 'solid', "#878b8f");
|
centralRect.setStroke(1, 'solid', "#878b8f");
|
||||||
workspace.append(centralRect);
|
workspace.append(centralRect);
|
||||||
|
|
||||||
workspace.addItAsChildTo(document.id("divWorkspace"));
|
workspace.addItAsChildTo($('#divWorkspace'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoomIn() {
|
function zoomIn() {
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
rect.setPosition(20, 20);
|
rect.setPosition(20, 20);
|
||||||
|
|
||||||
workspace.append(rect);
|
workspace.append(rect);
|
||||||
workspace.addItAsChildTo(document.id("rectExample"));
|
workspace.addItAsChildTo($('#rectExample'));
|
||||||
}
|
}
|
||||||
rectExampleTest();
|
rectExampleTest();
|
||||||
|
|
||||||
@ -79,7 +79,7 @@
|
|||||||
workspace.setSize("500px", "550px");
|
workspace.setSize("500px", "550px");
|
||||||
workspace.setCoordOrigin(0, -4);
|
workspace.setCoordOrigin(0, -4);
|
||||||
workspace.setCoordSize(500, 550);
|
workspace.setCoordSize(500, 550);
|
||||||
workspace.addItAsChildTo(document.id("roundRect"));
|
workspace.addItAsChildTo($('#roundRect'));
|
||||||
|
|
||||||
builder(workspace, 10, 50, 50);
|
builder(workspace, 10, 50, 50);
|
||||||
|
|
||||||
|
@ -56,14 +56,14 @@
|
|||||||
elipse1.setSize(200, 200);
|
elipse1.setSize(200, 200);
|
||||||
elipse1.setPosition(0, 0);
|
elipse1.setPosition(0, 0);
|
||||||
overflowWorkspace.append(elipse1);
|
overflowWorkspace.append(elipse1);
|
||||||
overflowWorkspace.addItAsChildTo(document.id("overflowExample"));
|
overflowWorkspace.addItAsChildTo($('#overflowExample'));
|
||||||
|
|
||||||
|
|
||||||
var workspacePosition = function () {
|
var workspacePosition = function () {
|
||||||
|
|
||||||
var elipseAttr = {width: 100, height: 100, x: 100, y: 100};
|
var elipseAttr = {width: 100, height: 100, x: 100, y: 100};
|
||||||
|
|
||||||
var divElem = document.id("positionExample");
|
var divElem = $('#positionExample');
|
||||||
var workPosition = new web2d.Workspace();
|
var workPosition = new web2d.Workspace();
|
||||||
workPosition.setSize("100px", "100px");
|
workPosition.setSize("100px", "100px");
|
||||||
elipse = new web2d.Elipse(elipseAttr);
|
elipse = new web2d.Elipse(elipseAttr);
|
||||||
@ -94,7 +94,7 @@
|
|||||||
elipse.setPosition(100, 100);
|
elipse.setPosition(100, 100);
|
||||||
|
|
||||||
workspacePixel.append(elipse);
|
workspacePixel.append(elipse);
|
||||||
workspacePixel.addItAsChildTo(document.id("sizeExamplePixels"));
|
workspacePixel.addItAsChildTo($('#sizeExamplePixels'));
|
||||||
|
|
||||||
var workspaceInchs = new web2d.Workspace();
|
var workspaceInchs = new web2d.Workspace();
|
||||||
workspaceInchs.setSize("1in", "1in");
|
workspaceInchs.setSize("1in", "1in");
|
||||||
@ -103,7 +103,7 @@
|
|||||||
elipse.setPosition(100, 100);
|
elipse.setPosition(100, 100);
|
||||||
|
|
||||||
workspaceInchs.append(elipse);
|
workspaceInchs.append(elipse);
|
||||||
workspaceInchs.addItAsChildTo(document.id("sizeExampleInch"));
|
workspaceInchs.addItAsChildTo($('#sizeExampleInch'));
|
||||||
|
|
||||||
|
|
||||||
var workspaceCoordSizeSample = function () {
|
var workspaceCoordSizeSample = function () {
|
||||||
@ -145,7 +145,7 @@
|
|||||||
workspace200x100.addItAsChildTo(document.id("coordsizeExample200x100"));
|
workspace200x100.addItAsChildTo(document.id("coordsizeExample200x100"));
|
||||||
|
|
||||||
var dynamicWorkspace = coordSizeSampleBuilder(100, 100);
|
var dynamicWorkspace = coordSizeSampleBuilder(100, 100);
|
||||||
dynamicWorkspace.addItAsChildTo(document.id("coordsizeExampleDynamic"));
|
dynamicWorkspace.addItAsChildTo($('#coordsizeExampleDynamic'));
|
||||||
|
|
||||||
var size = 100;
|
var size = 100;
|
||||||
var executer = function () {
|
var executer = function () {
|
||||||
@ -210,7 +210,7 @@
|
|||||||
|
|
||||||
// Workspace animation changing the coordsize from (30,30) to (100,100)
|
// Workspace animation changing the coordsize from (30,30) to (100,100)
|
||||||
var dynamicWorkspace = coordOriginSampleBuilder(100, 100);
|
var dynamicWorkspace = coordOriginSampleBuilder(100, 100);
|
||||||
dynamicWorkspace.addItAsChildTo(document.id("coordoriginExampleDynamic"));
|
dynamicWorkspace.addItAsChildTo($('#coordoriginExampleDynamic'));
|
||||||
|
|
||||||
var x = 50;
|
var x = 50;
|
||||||
var y = 50;
|
var y = 50;
|
||||||
|
Loading…
Reference in New Issue
Block a user