From 0d34fcfa7db59ed5c2f25487a3fea648fa71957d Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 8 Apr 2014 01:31:22 +0000 Subject: [PATCH] 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 --- editor/extensions/ext-connector.js | 2 +- editor/extensions/ext-foreignobject.js | 2 +- editor/extensions/ext-overview_window.js | 10 ++++----- editor/extensions/ext-polygon.js | 2 +- editor/extensions/ext-shapes.js | 2 +- editor/extensions/ext-star.js | 2 +- editor/svg-editor.js | 26 ++++++++++++++++-------- 7 files changed, 28 insertions(+), 18 deletions(-) diff --git a/editor/extensions/ext-connector.js b/editor/extensions/ext-connector.js index 85d857e5..ed677db1 100644 --- a/editor/extensions/ext-connector.js +++ b/editor/extensions/ext-connector.js @@ -83,7 +83,7 @@ svgEditor.addExtension("Connector", function(S) { function showPanel(on) { var conn_rules = $('#connector_rules'); if(!conn_rules.length) { - conn_rules = $('').appendTo('head'); } conn_rules.text(!on?"":"#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }"); $('#connector_panel').toggle(on); diff --git a/editor/extensions/ext-foreignobject.js b/editor/extensions/ext-foreignobject.js index 4aa3b99b..136485a9 100644 --- a/editor/extensions/ext-foreignobject.js +++ b/editor/extensions/ext-foreignobject.js @@ -30,7 +30,7 @@ svgEditor.addExtension("foreignObject", function(S) { function showPanel(on) { var fc_rules = $('#fc_rules'); if(!fc_rules.length) { - fc_rules = $('').appendTo('head'); } fc_rules.text(!on?"":" #tool_topath { display: none !important; }"); $('#foreignObject_panel').toggle(on); diff --git a/editor/extensions/ext-overview_window.js b/editor/extensions/ext-overview_window.js index 4ebdbd78..68101583 100644 --- a/editor/extensions/ext-overview_window.js +++ b/editor/extensions/ext-overview_window.js @@ -17,13 +17,13 @@ svgEditor.addExtension("overview_window", function() { 'use strict';
\
\ \ - <\/use>\ + \ \
\ - <\/div>\ - <\/div>\ - <\/div>\ - <\/div>"; +
\ +
\ +
\ + "; $("#sidepanels").append(propsWindowHtml); //define dynamic animation of the view box. diff --git a/editor/extensions/ext-polygon.js b/editor/extensions/ext-polygon.js index 16e1ce77..c8c5cc32 100644 --- a/editor/extensions/ext-polygon.js +++ b/editor/extensions/ext-polygon.js @@ -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 = $('').appendTo('head'); } fc_rules.text(!on ? "" : " #tool_topath { display: none !important; }"); $('#polygon_panel').toggle(on); diff --git a/editor/extensions/ext-shapes.js b/editor/extensions/ext-shapes.js index 0353da33..9784ad19 100644 --- a/editor/extensions/ext-shapes.js +++ b/editor/extensions/ext-shapes.js @@ -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><\/svg>', + '', 'text/xml'); var width = 24; diff --git a/editor/extensions/ext-star.js b/editor/extensions/ext-star.js index 17f53414..e97c09f0 100644 --- a/editor/extensions/ext-star.js +++ b/editor/extensions/ext-star.js @@ -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 = $('