Properly-formed URLs will not have spaces, so no need to replace; no need for "/" escaping unless within HTML doc; properly encode loadingImage window text; support loading of (properly URL encoded) non-base64 "data:image/svg+xml;utf8,"-style data URIs

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2782 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Brett Zamir
2014-04-08 01:31:22 +00:00
parent 91a627d53d
commit 0d34fcfa7d
7 changed files with 28 additions and 18 deletions

View File

@@ -83,7 +83,7 @@ svgEditor.addExtension("Connector", function(S) {
function showPanel(on) {
var conn_rules = $('#connector_rules');
if(!conn_rules.length) {
conn_rules = $('<style id="connector_rules"><\/style>').appendTo('head');
conn_rules = $('<style id="connector_rules"></style>').appendTo('head');
}
conn_rules.text(!on?"":"#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }");
$('#connector_panel').toggle(on);

View File

@@ -30,7 +30,7 @@ svgEditor.addExtension("foreignObject", function(S) {
function showPanel(on) {
var fc_rules = $('#fc_rules');
if(!fc_rules.length) {
fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head');
fc_rules = $('<style id="fc_rules"></style>').appendTo('head');
}
fc_rules.text(!on?"":" #tool_topath { display: none !important; }");
$('#foreignObject_panel').toggle(on);

View File

@@ -17,13 +17,13 @@ svgEditor.addExtension("overview_window", function() { 'use strict';
<div id=\"overview_window_content\" style=\"position:relative; left:12px; top:0px;\">\
<div style=\"background-color:#A0A0A0; display:inline-block; overflow:visible;\">\
<svg id=\"overviewMiniView\" width=\"150\" height=\"100\" x=\"0\" y=\"0\" viewBox=\"0 0 4800 3600\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\
<use x=\"0\" y=\"0\" xlink:href=\"#svgroot\"> <\/use>\
<use x=\"0\" y=\"0\" xlink:href=\"#svgroot\"> </use>\
</svg>\
<div id=\"overview_window_view_box\" style=\"min-width:50px; min-height:50px; position:absolute; top:30px; left:30px; z-index:5; background-color:rgba(255,0,102,0.3);\">\
<\/div>\
<\/div>\
<\/div>\
<\/div>";
</div>\
</div>\
</div>\
</div>";
$("#sidepanels").append(propsWindowHtml);
//define dynamic animation of the view box.

View File

@@ -40,7 +40,7 @@ svgEditor.addExtension("polygon", function(S) {'use strict';
function showPanel(on){
var fc_rules = $('#fc_rules');
if (!fc_rules.length) {
fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head');
fc_rules = $('<style id="fc_rules"></style>').appendTo('head');
}
fc_rules.text(!on ? "" : " #tool_topath { display: none !important; }");
$('#polygon_panel').toggle(on);

View File

@@ -88,7 +88,7 @@ svgEditor.addExtension('shapes', function() {'use strict';
var vb = [-off, -off, size + off*2, size + off*2].join(' ');
var stroke = fill ? 0: (size/30);
var shape_icon = new DOMParser().parseFromString(
'<svg xmlns="http://www.w3.org/2000/svg"><svg viewBox="' + vb + '"><path fill="'+(fill?'#333':'none')+'" stroke="#000" stroke-width="' + stroke + '" /><\/svg><\/svg>',
'<svg xmlns="http://www.w3.org/2000/svg"><svg viewBox="' + vb + '"><path fill="'+(fill?'#333':'none')+'" stroke="#000" stroke-width="' + stroke + '" /></svg></svg>',
'text/xml');
var width = 24;

View File

@@ -27,7 +27,7 @@ svgEditor.addExtension('star', function(S){'use strict';
function showPanel(on){
var fc_rules = $('#fc_rules');
if (!fc_rules.length) {
fc_rules = $('<style id="fc_rules"><\/style>').appendTo('head');
fc_rules = $('<style id="fc_rules"></style>').appendTo('head');
}
fc_rules.text(!on ? '' : ' #tool_topath { display: none !important; }');
$('#star_panel').toggle(on);