rename canvas to svgcanvas to avoid confusion
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@15 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
<div id="workarea">
|
||||
|
||||
<div id="canvas">
|
||||
<object class="canvas" data="canvas.svg" type="image/svg+xml">
|
||||
<embed class="canvas" src="canvas.svg" type="image/svg+xml" />
|
||||
<object class="canvas" data="svgcanvas.svg" type="image/svg+xml">
|
||||
<embed class="canvas" src="svgcanvas.svg" type="image/svg+xml" />
|
||||
</object>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ $(document).ready(function(){
|
||||
$('#stroke_color').css('background', color);
|
||||
}
|
||||
SvgCanvas.setStrokeColor(color);
|
||||
alert('boo');
|
||||
});
|
||||
|
||||
$('#tool_select').click(function(){
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var canvas = null;
|
||||
var svgcanvas = null;
|
||||
|
||||
function svgCanvasInit(event) {
|
||||
canvas = new SvgCanvas(event.target.ownerDocument);
|
||||
canvas.setup(event);
|
||||
top.SvgCanvas = canvas;
|
||||
svgcanvas = new SvgCanvas(event.target.ownerDocument);
|
||||
svgcanvas.setup(event);
|
||||
top.SvgCanvas = svgcanvas;
|
||||
}
|
||||
|
||||
function SvgCanvas(doc)
|
||||
@@ -449,9 +449,9 @@ function SvgCanvas(doc)
|
||||
|
||||
this.setup = function(evt) {
|
||||
assignAttributes(svgroot, {
|
||||
"onmouseup": "canvas.mouseUp(evt)",
|
||||
"onmousedown": "canvas.mouseDown(evt)",
|
||||
"onmousemove": "canvas.mouseMove(evt)"
|
||||
"onmouseup": "svgcanvas.mouseUp(evt)",
|
||||
"onmousedown": "svgcanvas.mouseDown(evt)",
|
||||
"onmousemove": "svgcanvas.mouseMove(evt)"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xml:space="preserve" id="svg_image" onload="svgCanvasInit(evt)" width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<script xlink:href="canvas.js" type="text/ecmascript"/>
|
||||
<script xlink:href="svgcanvas.js" type="text/ecmascript"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 392 B |
Reference in New Issue
Block a user