implements PR 57
parent
c8749a361c
commit
c8a0ae92f7
|
@ -7515,9 +7515,6 @@ svgedit.path.clearData = function() {
|
|||
// config - An object that contains configuration data
|
||||
$.SvgCanvas = function(container, config)
|
||||
{
|
||||
console.log(config);
|
||||
// todo in dist container gets mangled (?)
|
||||
container = document.getElementById("svgcanvas");
|
||||
// Namespace constants
|
||||
var svgns = "http://www.w3.org/2000/svg",
|
||||
xlinkns = "http://www.w3.org/1999/xlink",
|
||||
|
@ -12503,6 +12500,10 @@ var pathActions = canvas.pathActions = function() {
|
|||
switch (type) {
|
||||
case 1: // z,Z closepath (Z/z)
|
||||
d += "z";
|
||||
if(last_m && !toRel) {
|
||||
curx = last_m[0];
|
||||
cury = last_m[1];
|
||||
}
|
||||
break;
|
||||
case 12: // absolute horizontal line (H)
|
||||
x -= curx;
|
||||
|
@ -12555,7 +12556,7 @@ var pathActions = canvas.pathActions = function() {
|
|||
curx = x;
|
||||
cury = y;
|
||||
}
|
||||
if(type === 3) last_m = [curx, cury];
|
||||
if(type === 2 || type === 3) last_m = [curx, cury];
|
||||
|
||||
addToD([[x,y]]);
|
||||
break;
|
||||
|
@ -16471,7 +16472,6 @@ if(!window.methodDraw) window.methodDraw = function($) {
|
|||
no_save_warning: true,
|
||||
initFont: 'Helvetica, Arial, sans-serif'
|
||||
};
|
||||
console.log(curConfig);
|
||||
var curPrefs = {}; //$.extend({}, defaultPrefs);
|
||||
var customHandlers = {};
|
||||
Editor.curConfig = curConfig;
|
||||
|
@ -19312,7 +19312,7 @@ if(!window.methodDraw) window.methodDraw = function($) {
|
|||
|
||||
// Test for embedImage support (use timeout to not interfere with page load)
|
||||
setTimeout(function() {
|
||||
svgCanvas.embedImage('images/placeholder.svg', function(datauri) {
|
||||
svgCanvas.embedImage(curConfig.imgPath + 'placeholder.svg', function(datauri) {
|
||||
if(!datauri) {
|
||||
// Disable option
|
||||
$('#image_save_opts [value=embed]').attr('disabled','disabled');
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="description" content="Method Draw is an open source SVG editor for the web, you can use it online without signing up.">
|
||||
|
||||
<link rel="stylesheet" href="all.css?t=1596361128033">
|
||||
<link rel="stylesheet" href="all.css?t=1596365861781">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -583,7 +583,7 @@
|
|||
</ul>
|
||||
|
||||
|
||||
<script src="all.js?t=1596361128033"></script>
|
||||
<script src="all.js?t=1596365861781"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2883,7 +2883,7 @@ if(!window.methodDraw) window.methodDraw = function($) {
|
|||
|
||||
// Test for embedImage support (use timeout to not interfere with page load)
|
||||
setTimeout(function() {
|
||||
svgCanvas.embedImage('images/placeholder.svg', function(datauri) {
|
||||
svgCanvas.embedImage(curConfig.imgPath + 'placeholder.svg', function(datauri) {
|
||||
if(!datauri) {
|
||||
// Disable option
|
||||
$('#image_save_opts [value=embed]').attr('disabled','disabled');
|
||||
|
|
Loading…
Reference in New Issue