- Breaking change: Rename config file to `svgedit-config-iife.js` (or for the module version, `svgedit-config-es.js`);
also expect one directory higher; incorporates #207 (@iuyiuy)
- Breaking change: Separate `extIconsPath` from `extPath` (not copying over icons)
- Breaking change: Don't reference `custom.css` in HTML; can instead be referenced in JavaScript through
the config file (provided in `svgedit-config-sample-iife.js`/`svgedit-config-sample-es.js` as `svgedit-custom.css` for
better namespacing); incorporates #207 (@iuyiuy)
- Breaking change: Remove minified jgraduate/spinbtn files (minified within Rollup routine)
- Fix: Zoom when scrolled; incorporates #169 (@AndrolGenhald), adapting for conventions; also allow avoidance when shift key pressed
- Fix: Update Atom feed reference in HTML
- Fixes related to recent commits: Some path and method name fixes needed, function order, missing methods, variable scope declaration, no need for DOMContentLoaded listeners in modules, switch back to non-default export, avoid trimming nullish, deal with mock tests, fix `math.matrixMultiply`, use jquery-svg where needed for array/SVG attributes; add babel-polyfill and defer script to imagelib; other misc. fixes
- Enhancement: Move config-sample.js out of `editor` directory
- Enhancement: For `callback`-style extensions, also provide config object; add following
to that object: buildCanvgCallback, canvg, decode64, encode64, executeAfterLoads, getTypeMap, isChrome, ieIE, NS, text2xml
- Enhancement: Complete ES6 modules work (extensions, locales, tests), along with Babel;
make Node build routine for converting modular source to non-modular,
use `loadStylesheets` for modular stylehsheet defining (but parallel loading);
- Enhancement: Add `stylesheets` config for modular but parallel stylesheet loading with `@default` option for simple inclusion/exclusion of defaults (if not going with default).
- Refactoring: Clean up `svg-editor.html`: consistent indents; avoid extra lbs, avoid long lines
- Refactoring: Avoid embedded API adding inline JavaScript listener
- Refactoring: Move layers and context code to `draw.js`
- Refactoring: Move `pathActions` from `svgcanvas.js` (though preserve aliases to these methods on `canvas`) and `convertPath` from `svgutils.js` to `path.js`
- Refactoring: Move `getStrokedBBox` from `svgcanvas.js` (while keeping an alias) to `svgutils.js` (as `getStrokedBBoxDefaultVisible` to avoid conflict with existing)
- Docs: Remove "dependencies" comments in code except where summarizing role of jQuery or a non-obvious dependency
- Refactoring/Linting: Enfore `no-extra-semi` and `quote-props` rules
- Refactoring: Further avoidance of quotes on properties (as possible)
- Refactoring: Use `class` in place of functions where intended as classes
- Refactoring: Consistency and granularity in extensions imports
- Testing: Update QUnit to 2.6.1 (node_modules) and Sinon to 5.0.8 (and add sinon-test at 2.1.3) and enforce eslint-plugin-qunit linting rules; update custom extensions
- Testing: Add node-static for automating (and accessing out-of-directory contents)
- Testing: Avoid HTML attributes for styling
- Testing: Add npm `test` script
- Testing: Comment out unused jQuery SVG test
- Testing: Add test1 and svgutils_performance_test to all tests page
- Testing: Due apparently to Path having not been a formal class, the test was calling it without `new`; refactored now with sufficient mock data to take into account it is a class
- npm: Update devDeps
- npm: Add html modules and config build to test script
2018-05-22 10:03:16 +00:00
import svgEditor from '../svg-editor.js' ;
2011-01-11 21:15:08 +00:00
svgEditor . readLang ( {
2018-05-20 07:04:11 +00:00
lang : 'lang' ,
dir : 'dir' ,
2018-05-18 06:23:36 +00:00
common : {
2018-05-18 03:25:45 +00:00
ok : 'OK' ,
cancel : 'Cancel' ,
key _backspace : 'Backspace' ,
key _del : 'Del' ,
key _down : 'Down' ,
key _up : 'Up' ,
2018-05-25 13:25:38 +00:00
more _opts : 'More options' ,
2018-05-20 07:04:11 +00:00
url : 'url' ,
width : 'width' ,
height : 'height'
2018-05-18 06:23:36 +00:00
} ,
misc : {
2018-05-25 13:25:38 +00:00
powered _by : 'Powered by'
2018-05-18 06:23:36 +00:00
} ,
ui : {
2018-05-25 13:25:38 +00:00
toggle _stroke _tools : 'Show/hide more stroke tools' ,
palette _info : 'Click to change fill color, shift-click to change stroke color' ,
zoom _level : 'Change zoom level' ,
panel _drag : 'Drag left/right to resize side panel' ,
2018-05-18 03:25:45 +00:00
quality : 'Quality:' ,
pathNodeTooltip : 'Drag node to move it. Double-click node to change segment type' ,
pathCtrlPtTooltip : 'Drag control point to adjust curve properties'
2018-05-18 06:23:36 +00:00
} ,
properties : {
2018-05-20 07:04:11 +00:00
id : 'id' ,
2018-05-25 13:25:38 +00:00
fill _color : 'Change fill color' ,
stroke _color : 'Change stroke color' ,
stroke _style : 'Change stroke dash style' ,
stroke _width : 'Change stroke width by 1, shift-click to change by 0.1' ,
pos _x : 'Change X coordinate' ,
pos _y : 'Change Y coordinate' ,
linecap _butt : 'Linecap: Butt' ,
linecap _round : 'Linecap: Round' ,
linecap _square : 'Linecap: Square' ,
linejoin _bevel : 'Linejoin: Bevel' ,
linejoin _miter : 'Linejoin: Miter' ,
linejoin _round : 'Linejoin: Round' ,
2018-05-20 07:04:11 +00:00
angle : 'angle' ,
blur : 'blur' ,
opacity : 'opacity' ,
circle _cx : "Change circle's cx coordinate" ,
circle _cy : "Change circle's cy coordinate" ,
circle _r : "Change circle's radius" ,
ellipse _cx : "Change ellipse's cx coordinate" ,
ellipse _cy : "Change ellipse's cy coordinate" ,
ellipse _rx : "Change ellipse's x radius" ,
ellipse _ry : "Change ellipse's y radius" ,
line _x1 : "Change line's starting x coordinate" ,
line _x2 : "Change line's ending x coordinate" ,
line _y1 : "Change line's starting y coordinate" ,
line _y2 : "Change line's ending y coordinate" ,
2018-05-25 13:25:38 +00:00
rect _height : 'Change rectangle height' ,
rect _width : 'Change rectangle width' ,
corner _radius : 'Change Rectangle Corner Radius' ,
image _width : 'Change image width' ,
image _height : 'Change image height' ,
image _url : 'Change URL' ,
2018-05-20 07:04:11 +00:00
node _x : "Change node's x coordinate" ,
node _y : "Change node's y coordinate" ,
2018-05-25 13:25:38 +00:00
seg _type : 'Change Segment type' ,
straight _segments : 'Straight' ,
curve _segments : 'Curve' ,
2018-05-20 07:04:11 +00:00
text _contents : 'text_contents' ,
2018-05-25 13:25:38 +00:00
font _family : 'Change Font Family' ,
font _size : 'Change Font Size' ,
bold : 'Bold Text [B]' ,
italic : 'Italic Text [I]'
2018-05-18 06:23:36 +00:00
} ,
tools : {
2018-05-25 13:25:38 +00:00
main _menu : 'Main Menu' ,
2018-05-20 07:04:11 +00:00
bkgnd _color _opac : 'bkgnd_color_opac' ,
2018-05-25 13:25:38 +00:00
connector _no _arrow : 'No arrow' ,
fitToContent : 'Fit to Content' ,
fit _to _all : 'Fit to all content' ,
fit _to _canvas : 'Fit to canvas' ,
fit _to _layer _content : 'Fit to layer content' ,
fit _to _sel : 'Fit to selection' ,
align _relative _to : 'Align relative to ...' ,
relativeTo : 'relative to:' ,
2018-05-20 07:04:11 +00:00
page : 'page' ,
2018-05-25 13:25:38 +00:00
largest _object : 'largest object' ,
selected _objects : 'selected objects' ,
smallest _object : 'smallest object' ,
new _doc : 'New Image' ,
open _doc : 'Open SVG' ,
export _img : 'Export' ,
save _doc : 'Save Image' ,
import _doc : 'Import Image' ,
align _to _page : 'Align Element to Page' ,
align _bottom : 'Align Bottom' ,
align _center : 'Align Center' ,
align _left : 'Align Left' ,
align _middle : 'Align Middle' ,
align _right : 'Align Right' ,
align _top : 'Align Top' ,
mode _select : 'Select Tool' ,
mode _fhpath : 'Pencil Tool' ,
mode _line : 'Line Tool' ,
mode _connect : 'Connect two objects' ,
mode _rect : 'Rectangle' ,
mode _square : 'Square' ,
mode _fhrect : 'Free-Hand Rectangle' ,
mode _ellipse : 'Ellipse' ,
mode _circle : 'Circle' ,
mode _fhellipse : 'Free-Hand Ellipse' ,
mode _path : 'Path Tool' ,
mode _shapelib : 'Shape library' ,
mode _text : 'Text Tool' ,
mode _image : 'Image Tool' ,
mode _zoom : 'Zoom Tool [Ctrl+Up/Down]' ,
mode _eyedropper : 'Eye Dropper Tool' ,
no _embed : 'NOTE: This image cannot be embedded. It will depend on this path to be displayed' ,
undo : 'Undo [Z]' ,
redo : 'Redo [Y]' ,
tool _source : 'Edit Source [U]' ,
wireframe _mode : 'Wireframe Mode [F]' ,
toggle _grid : 'Show/Hide Grid' ,
clone : 'Duplicate Element [D]' ,
del : 'Delete Element [Delete/Backspace]' ,
group _elements : 'Group Elements [G]' ,
make _link : 'Make (hyper)link' ,
set _link _url : 'Set link URL (leave empty to remove)' ,
to _path : 'Convert to Path' ,
reorient _path : 'Reorient path' ,
ungroup : 'Ungroup Elements [G]' ,
docprops : 'Document Properties (D)' ,
imagelib : 'Image library' ,
move _bottom : 'Send to Back [ Ctrl+Shift+[ ]' ,
move _top : 'Bring to Front [ Ctrl+Shift+] ]' ,
node _clone : 'Clone Node' ,
node _delete : 'Delete Node' ,
node _link : 'Link Control Points' ,
add _subpath : 'Add sub-path' ,
openclose _path : 'Open/close sub-path' ,
source _save : 'Apply Changes' ,
cut : 'Cut' ,
copy : 'Copy' ,
paste : 'Paste' ,
paste _in _place : 'Paste in Place' ,
delete : 'Delete' ,
group : 'Group' ,
move _front : 'Bring to Front (SHFT+CTRL+])' ,
move _up : 'Bring Forward (CTRL+])' ,
move _down : 'Send Backward (CTRL+[)' ,
move _back : 'Send to Back (SHFT+CTRL+[)'
2018-05-18 06:23:36 +00:00
} ,
layers : {
2018-05-18 03:25:45 +00:00
layer : 'Layer' ,
2018-05-25 13:25:38 +00:00
layers : 'Layers' ,
del : 'Delete Layer' ,
move _down : 'Move Layer Down' ,
new : 'New Layer' ,
rename : 'Rename Layer' ,
move _up : 'Move Layer Up' ,
dupe : 'Duplicate Layer...' ,
merge _down : 'Merge Down' ,
merge _all : 'Merge All' ,
move _elems _to : 'Move elements to:' ,
move _selected : 'Move selected elements to a different layer'
2018-05-18 06:23:36 +00:00
} ,
config : {
2018-05-25 13:25:38 +00:00
image _props : 'Image Properties' ,
doc _title : 'Title:' ,
doc _dims : 'Canvas Dimensions' ,
included _images : 'Included Images' ,
image _opt _embed : 'Embed data (local files)' ,
image _opt _ref : 'Use file reference' ,
editor _prefs : 'Editor Preferences' ,
icon _size : 'Icon size:' ,
language : 'Language:' ,
background : 'Editor Background' ,
editor _img _url : 'URL:' ,
editor _bg _note : 'Note: Background will not be saved with image.' ,
icon _large : 'Large' ,
icon _medium : 'Medium' ,
icon _small : 'Small' ,
icon _xlarge : 'Extra Large' ,
select _predefined : 'Select predefined:' ,
units _and _rulers : 'Units & Rulers' ,
show _rulers : 'Show rulers' ,
base _unit : 'Base Unit:' ,
grid : 'Grid' ,
snapping _onoff : 'Snapping on/off' ,
snapping _stepsize : 'Snapping Step-Size:' ,
grid _color : 'Grid color:'
2018-05-18 06:23:36 +00:00
} ,
shape _cats : {
2018-05-20 07:04:11 +00:00
basic : 'basic' ,
object : 'object' ,
symbol : 'symbol' ,
arrow : 'arrow' ,
flowchart : 'flowchart' ,
animal : 'animal' ,
game : 'game' ,
2018-05-25 13:25:38 +00:00
dialog _balloon : 'Dialog balloons' ,
electronics : 'Electronics' ,
math : 'Mathematical' ,
music : 'Music' ,
misc : 'Miscellaneous' ,
raphael _1 : 'raphaeljs.com set 1' ,
raphael _2 : 'raphaeljs.com set 2'
2018-05-18 06:23:36 +00:00
} ,
imagelib : {
2018-05-25 13:25:38 +00:00
select _lib : 'Select an image library' ,
show _list : 'Show library list' ,
import _single : 'Import single' ,
import _multi : 'Import multiple' ,
open : 'Open as new document'
2018-05-18 06:23:36 +00:00
} ,
notification : {
2018-05-18 03:25:45 +00:00
invalidAttrValGiven : 'Invalid value given' ,
noContentToFitTo : 'No content to fit to' ,
dupeLayerName : 'There is already a layer named that!' ,
enterUniqueLayerName : 'Please enter a unique layer name' ,
enterNewLayerName : 'Please enter the new layer name' ,
layerHasThatName : 'Layer already has that name' ,
QmoveElemsToLayer : 'Move selected elements to layer \'%s\'?' ,
QwantToClear : 'Do you want to clear the drawing?\nThis will also erase your undo history!' ,
QwantToOpen : 'Do you want to open a new file?\nThis will also erase your undo history!' ,
QerrorsRevertToSource : 'There were parsing errors in your SVG source.\nRevert back to original SVG source?' ,
QignoreSourceChanges : 'Ignore changes made to SVG source?' ,
2018-05-30 07:59:45 +00:00
saveFromBrowser : 'Select \'Save As...\' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.' ,
2018-05-18 03:25:45 +00:00
noteTheseIssues : 'Also note the following issues: ' ,
unsavedChanges : 'There are unsaved changes.' ,
enterNewLinkURL : 'Enter the new hyperlink URL' ,
errorLoadingSVG : 'Error: Unable to load SVG data' ,
URLloadFail : 'Unable to load from URL' ,
retrieving : 'Retrieving \'%s\' ...' ,
popupWindowBlocked : 'Popup window may be blocked by browser' ,
featNotSupported : 'Feature not supported' ,
enterNewImgURL : 'Enter the new image URL' ,
defsFailOnSave : 'NOTE: Due to a bug in your browser, this image may appear wrong (missing gradients or elements). It will however appear correct once actually saved.' ,
loadingImage : 'Loading image, please wait...' ,
exportNoBlur : 'Blurred elements will appear as un-blurred' ,
exportNoforeignObject : 'foreignObject elements will not appear' ,
exportNoDashArray : 'Strokes will appear filled' ,
exportNoText : 'Text may not appear as expected'
2018-05-18 06:23:36 +00:00
}
2018-05-13 03:03:45 +00:00
} ) ;