changing path to jquery
parent
1dee9cf79a
commit
c3e58463a6
|
@ -20,7 +20,7 @@
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/assets/jquery.js"></script>
|
<script type="text/javascript" src="assets/jquery.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<!--{if svg_edit_release}>
|
<!--{if svg_edit_release}>
|
||||||
|
|
|
@ -3625,41 +3625,42 @@
|
||||||
|
|
||||||
//image handling
|
//image handling
|
||||||
else {
|
else {
|
||||||
var reader = new FileReader();
|
alert("sorry, bitmap import is temporalily disabled")
|
||||||
reader.onloadend = function(e) {
|
//var reader = new FileReader();
|
||||||
// lets insert the new image until we know its dimensions
|
//reader.onloadend = function(e) {
|
||||||
insertNewImage = function(img_width, img_height){
|
// // lets insert the new image until we know its dimensions
|
||||||
var newImage = svgCanvas.addSvgElementFromJson({
|
// insertNewImage = function(img_width, img_height){
|
||||||
"element": "image",
|
// var newImage = svgCanvas.addSvgElementFromJson({
|
||||||
"attr": {
|
// "element": "image",
|
||||||
"x": 0,
|
// "attr": {
|
||||||
"y": 0,
|
// "x": 0,
|
||||||
"width": img_width,
|
// "y": 0,
|
||||||
"height": img_height,
|
// "width": img_width,
|
||||||
"id": svgCanvas.getNextId(),
|
// "height": img_height,
|
||||||
"style": "pointer-events:inherit"
|
// "id": svgCanvas.getNextId(),
|
||||||
}
|
// "style": "pointer-events:inherit"
|
||||||
});
|
// }
|
||||||
svgCanvas.setHref(newImage, e.target.result);
|
// });
|
||||||
svgCanvas.selectOnly([newImage])
|
// svgCanvas.setHref(newImage, e.target.result);
|
||||||
svgCanvas.alignSelectedElements("m", "page")
|
// svgCanvas.selectOnly([newImage])
|
||||||
svgCanvas.alignSelectedElements("c", "page")
|
// svgCanvas.alignSelectedElements("m", "page")
|
||||||
updateContextPanel();
|
// svgCanvas.alignSelectedElements("c", "page")
|
||||||
}
|
// updateContextPanel();
|
||||||
// put a placeholder img so we know the default dimensions
|
// }
|
||||||
var img_width = 100;
|
// // put a placeholder img so we know the default dimensions
|
||||||
var img_height = 100;
|
// var img_width = 100;
|
||||||
var img = new Image()
|
// var img_height = 100;
|
||||||
img.src = e.target.result
|
// var img = new Image()
|
||||||
document.body.appendChild(img);
|
// img.src = e.target.result
|
||||||
img.onload = function() {
|
// document.body.appendChild(img);
|
||||||
img_width = img.offsetWidth
|
// img.onload = function() {
|
||||||
img_height = img.offsetHeight
|
// img_width = img.offsetWidth
|
||||||
insertNewImage(img_width, img_height);
|
// img_height = img.offsetHeight
|
||||||
document.body.removeChild(img);
|
// insertNewImage(img_width, img_height);
|
||||||
}
|
// document.body.removeChild(img);
|
||||||
};
|
// }
|
||||||
reader.readAsDataURL(file)
|
//};
|
||||||
|
//reader.readAsDataURL(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,7 +20,7 @@
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/assets/jquery.js"></script>
|
<script type="text/javascript" src="assets/jquery.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<!--{if svg_edit_release}-->
|
<!--{if svg_edit_release}-->
|
||||||
|
|
|
@ -3625,41 +3625,42 @@
|
||||||
|
|
||||||
//image handling
|
//image handling
|
||||||
else {
|
else {
|
||||||
var reader = new FileReader();
|
alert("sorry, bitmap import is temporalily disabled")
|
||||||
reader.onloadend = function(e) {
|
//var reader = new FileReader();
|
||||||
// lets insert the new image until we know its dimensions
|
//reader.onloadend = function(e) {
|
||||||
insertNewImage = function(img_width, img_height){
|
// // lets insert the new image until we know its dimensions
|
||||||
var newImage = svgCanvas.addSvgElementFromJson({
|
// insertNewImage = function(img_width, img_height){
|
||||||
"element": "image",
|
// var newImage = svgCanvas.addSvgElementFromJson({
|
||||||
"attr": {
|
// "element": "image",
|
||||||
"x": 0,
|
// "attr": {
|
||||||
"y": 0,
|
// "x": 0,
|
||||||
"width": img_width,
|
// "y": 0,
|
||||||
"height": img_height,
|
// "width": img_width,
|
||||||
"id": svgCanvas.getNextId(),
|
// "height": img_height,
|
||||||
"style": "pointer-events:inherit"
|
// "id": svgCanvas.getNextId(),
|
||||||
}
|
// "style": "pointer-events:inherit"
|
||||||
});
|
// }
|
||||||
svgCanvas.setHref(newImage, e.target.result);
|
// });
|
||||||
svgCanvas.selectOnly([newImage])
|
// svgCanvas.setHref(newImage, e.target.result);
|
||||||
svgCanvas.alignSelectedElements("m", "page")
|
// svgCanvas.selectOnly([newImage])
|
||||||
svgCanvas.alignSelectedElements("c", "page")
|
// svgCanvas.alignSelectedElements("m", "page")
|
||||||
updateContextPanel();
|
// svgCanvas.alignSelectedElements("c", "page")
|
||||||
}
|
// updateContextPanel();
|
||||||
// put a placeholder img so we know the default dimensions
|
// }
|
||||||
var img_width = 100;
|
// // put a placeholder img so we know the default dimensions
|
||||||
var img_height = 100;
|
// var img_width = 100;
|
||||||
var img = new Image()
|
// var img_height = 100;
|
||||||
img.src = e.target.result
|
// var img = new Image()
|
||||||
document.body.appendChild(img);
|
// img.src = e.target.result
|
||||||
img.onload = function() {
|
// document.body.appendChild(img);
|
||||||
img_width = img.offsetWidth
|
// img.onload = function() {
|
||||||
img_height = img.offsetHeight
|
// img_width = img.offsetWidth
|
||||||
insertNewImage(img_width, img_height);
|
// img_height = img.offsetHeight
|
||||||
document.body.removeChild(img);
|
// insertNewImage(img_width, img_height);
|
||||||
}
|
// document.body.removeChild(img);
|
||||||
};
|
// }
|
||||||
reader.readAsDataURL(file)
|
//};
|
||||||
|
//reader.readAsDataURL(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue