commit
a262a6c50a
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"external-helpers"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
node_modules
|
||||
|
||||
dist
|
||||
docs/jsdoc
|
||||
|
||||
svgedit-config-es.js
|
||||
svgedit-config-iife.js
|
||||
svgedit-custom.css
|
||||
editor/xdomain-svgedit-config-iife.js
|
||||
|
||||
# Vendor/minified files
|
||||
editor/jquery.min.js
|
||||
editor/jquery-ui
|
||||
|
||||
# Previously minified though exporting
|
||||
editor/jquerybbq
|
||||
|
||||
# Previously minified though exporting
|
||||
editor/js-hotkeys
|
||||
|
||||
editor/jspdf/jspdf.min.js
|
||||
editor/jspdf/underscore-min.js
|
||||
|
||||
editor/extensions/imagelib/jquery.min.js
|
||||
editor/extensions/mathjax
|
||||
|
||||
editor/external/*
|
||||
!editor/external/dom-polyfill
|
||||
editor/external/dom-polyfill/*
|
||||
!editor/external/dom-polyfill/dom-polyfill.js
|
||||
!editor/external/dynamic-import-polyfill
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"extends": ["standard", "plugin:qunit/recommended"],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["qunit"],
|
||||
"env": {
|
||||
"node": false,
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"semi": [2, "always"],
|
||||
"indent": ["error", 2, {"outerIIFEBody": 0}],
|
||||
"no-tabs": 0,
|
||||
"object-property-newline": 0,
|
||||
"one-var": 0,
|
||||
"no-var": 2,
|
||||
"prefer-const": 2,
|
||||
"no-extra-semi": 2,
|
||||
"quote-props": [2, "as-needed"]
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
# See editor/config-sample.js for an example
|
||||
editor/config.js
|
||||
editor/custom.css
|
||||
node_modules
|
||||
|
||||
build/
|
||||
editor/svgedit.compiled.js
|
||||
|
||||
svgedit-custom.css
|
||||
|
||||
docs/jsdoc
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
screencasts
|
||||
test
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"plugins": {
|
||||
"lint": {
|
||||
"ordered-list-marker-value": "one",
|
||||
"no-missing-blank-lines": false,
|
||||
"list-item-spacing": false,
|
||||
"list-item-indent": false
|
||||
}
|
||||
}
|
||||
}
|
1
AUTHORS
1
AUTHORS
|
@ -3,6 +3,7 @@ Pavol Rusnak <stick@gk2.sk>
|
|||
Jeff Schiller <codedread@gmail.com>
|
||||
Vidar Hokstad <vidar.hokstad@gmail.com>
|
||||
Alexis Deveria <adeveria@gmail.com>
|
||||
Brett Zamir <brettz9@yahoo.com>
|
||||
|
||||
Translation credits:
|
||||
|
||||
|
|
686
CHANGES.md
686
CHANGES.md
|
@ -1,3 +1,397 @@
|
|||
# 3.0.0-rc.2
|
||||
|
||||
- Fix: Avoid extension `includeWith` button conflicts/redundancies;
|
||||
Incorporates #147
|
||||
- Fix: Ensure shift-key cycling through flyouts works with extension-added
|
||||
`includeWith` as well as toolbarbuttons
|
||||
- Fix: Apply flyout arrows after extensions callback
|
||||
- Fix: Ensure SVG icon of flyout right-arrow is cloned to can be applied to
|
||||
more than one extension
|
||||
- Fix: Ensure line tool shows as selected when "L" key command is used
|
||||
- Fix: Add images (and references) for fallback (#135)
|
||||
- Fix (svgIcons plugin): Race condition
|
||||
- Fix (canvg): Regression for `text` and `tspan` elements as far as
|
||||
`captureTextNodes` with canvg (inheriting class had set
|
||||
`captureTextNodes` too late)
|
||||
- Fix (canvg): Regression on blur
|
||||
- Fix (canvg): Avoid errors for `tspan` passed to `getGradient`
|
||||
- i18n: picking stroke/fill paint and opacity
|
||||
- i18n: Remove eyedropper and imagelib references from main locale (in
|
||||
extension locale now)
|
||||
- i18n: Add placeholders for `pick_stroke_paint_opacity`,
|
||||
`pick_fill_paint_opacity`, `popupWindowBlocked`
|
||||
- i18n: Update `saveFromBrowser`
|
||||
- i18n: Reapply locale strings
|
||||
- Enhancement: Create xdomain file build which works without ES6 Modules
|
||||
- Enhancement: Build xdomain files dynamically
|
||||
- Optimize: Further image optimizing
|
||||
- Optimize: Avoid rewriting `points` attribute for free-hand path;
|
||||
incorporates #176 (fixes #175)
|
||||
- Refactoring: Avoid passing on `undefined` var. (#147)
|
||||
- Refactoring: lbs; avoid indent in connector, destructuring, use map
|
||||
over push
|
||||
- Docs: Clarify nature of fixes
|
||||
- Docs: JSDoc for `setupFlyouts`, `Actions`, `toggleSidePanel`; missing for
|
||||
ToolbarButton
|
||||
|
||||
# 3.0.0-rc.1
|
||||
|
||||
- Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath',
|
||||
'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
|
||||
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in
|
||||
conformity with JSDoc module naming convention)
|
||||
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear
|
||||
purpose and avoid confusing with editor)
|
||||
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
|
||||
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
|
||||
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
|
||||
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
|
||||
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to
|
||||
have file name more closely reflect name)
|
||||
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
|
||||
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
|
||||
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a
|
||||
poyfill of SVGPathSeg)
|
||||
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson`
|
||||
for consistency
|
||||
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for
|
||||
consistency
|
||||
- Breaking change: Have `exportPDF` resolve with `output` and `outputType`
|
||||
rather than `dataurlstring` (as type may vary)
|
||||
- Breaking change: Rename `extensions/mathjax/MathJax.js` to
|
||||
`extensions/mathjax/MathJax.min.js`
|
||||
- Breaking change: Avoid recent change to have editor ready callbacks
|
||||
return Promises (we're not using and advantageous to keep sequential)
|
||||
- Breaking change: Avoid recent addition of locale-side function in
|
||||
ext-imagelib for l10n
|
||||
- Breaking change: Change name of `ext-arrows.js` from `Arrows` to `arrows`
|
||||
for sake of file path (not localized anyways).
|
||||
- Breaking change: Change `addlangData` extension event to `addLangData`
|
||||
for consistency with method name
|
||||
- Breaking change: In interests of modularity/removing globals,
|
||||
remove `window.svgCanvas` and `svgCanvas.ready` as used by older
|
||||
extensions; use `svgEditor.canvas` and `svgEditor.ready` instead
|
||||
- Breaking change: Extension now formatted as export (and `this`
|
||||
is set to editor, including for `callback`)
|
||||
- Breaking change: Locale now formatted as export
|
||||
- Breaking change: Moved out remaining modular i18n (imagelib) to own folder
|
||||
- Breaking change: Drop `executeAfterLoads` (and getJSPDF/getCanvg)
|
||||
- Breaking change: `RGBColor` must accept `new`
|
||||
- Breaking change: canvg - `stackBlurCanvasRGBA` must be set now by function
|
||||
(`setStackBlurCanvasRGBA`) rather than global; `canvg` now a named export
|
||||
- Breaking change: Avoid passing `canvg`/`buildCanvgCallback` to extensions
|
||||
(have them import)
|
||||
- Breaking change: Have `readLang` return lang and data but do not call
|
||||
`setLang`
|
||||
- Breaking change: Avoid adding `assignAttributes`, `addSVGElementFromJson`,
|
||||
`call`, `copyElem`, `findDefs`, `getElem`, `getId`, `getIntersectionList`,
|
||||
`getMouseTarget`, `getNextId`, `getUrlFromAttr`, `hasMatrixTransform`,
|
||||
`matrixMultiply`, `recalculateAllSelectedDimensions`,
|
||||
`recalculateDimensions`, `remapElement`, `removeUnusedDefElems`, `round`,
|
||||
`runExtensions`, `sanitizeSvg`, `setGradient` `transformListToTransform`
|
||||
(and mistaken `toString` export) to `getPrivateMethods` (passed to
|
||||
extensions) as available as public ones
|
||||
- npm: Add `prepublishOnly` script to ensure building/testing before publish
|
||||
- npm: Update devDeps including Rollup, Sinon
|
||||
- Fix: Remove redundant (and incorrect) length set. (#256 ; fixes #255)
|
||||
- Fix: Detection of whether to keep ellipse (rx and ry when just created
|
||||
are now returning 0 instead of null); also with rectangle/square;
|
||||
fixes #262
|
||||
- Fix: Avoid erring during resize on encountering MathML (which have no
|
||||
`style`)
|
||||
- Fix: Have general locales load first so extensions may use
|
||||
- Fix: Provide `importLocale` to extensions `init` so it may delay
|
||||
adding of the extension until locale data loaded
|
||||
- Fix: i18nize imaglib more deeply
|
||||
- Fix: Positioning of Document Properties dialog (Fixes #246)
|
||||
- Fix (regression): PDF Export (Fixes #249)
|
||||
- Fix (regression): Add polyfill for `ChildNode`/`ParentNode` (and use further)
|
||||
- Fix (regression): Apply Babel universally to dependencies
|
||||
- Fix (regression): Ordering of `uaPrefix` function in `svgEditor.js`
|
||||
- Fix (regression): Embedded API
|
||||
- Fix (embedded editor): Fix backspace key in Firefox so it doesn't navigate
|
||||
out of frame
|
||||
- Fix: Alert if no `exportWindow` for PDF (e.g., if blocked)
|
||||
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME
|
||||
type to PNG
|
||||
- Fix (extension): Wrong name for moinsave
|
||||
- Fix (extension): ForeignObject editor
|
||||
- Fix (Embedded API): Cross-domain may fail to even access `origin` or
|
||||
`contentDocument`
|
||||
- Fix (Embedded API): Avoid adding URL to iframe src if there are no arguments
|
||||
- Fix (Embedded API): Handle origin issues (fixes #173)
|
||||
- Fix (Cross-domain usage): Recover from exceptions with `localStorage`
|
||||
- Fix regression (Imagelib): Fix path for non-module version
|
||||
- Update: Update WebAppFind per new API changes
|
||||
- Enhancement: Link to rawgit/raw.githack for live master demos (fixes #43)
|
||||
- Enhancement: Make `setStrings` public on editor for late setting (used
|
||||
by `ext-shapes.js`)
|
||||
- Enhancement: Add `extensions_added` event
|
||||
- Enhancement: Add `message` event (Relay messages including those which
|
||||
have been been received prior to extension load)
|
||||
- Enhancement: Sort SVG attributes alphabetically (#252 @Neil Fraser)
|
||||
- Enhancement: Allow callback argument and return promise
|
||||
for canvas methods: `rasterExport` and `exportPDF`
|
||||
- Enhancement: Add `pointsAdded` canvas event (Fixes #141)
|
||||
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying
|
||||
sample config file. Should also help with Github-based file servers
|
||||
- Enhancement: Allow avoiding "name" in extension export (just extract out
|
||||
of file name)
|
||||
- Enhancement: Add stack blur to canvg by default (and refactoring it)
|
||||
- Enhancement: Return `Promise` for `embedImage` (as with some other loading
|
||||
methods)
|
||||
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension
|
||||
locale loading
|
||||
- Enhancement: Recover if an extension fails to load (just log and otherwise
|
||||
ignore)
|
||||
- Enhancement: More i18n of extensions
|
||||
- Enhancement: Allowing importing of locales within `addLangData`
|
||||
- i18n: Clarify locale messages (where still available as English) to reflect
|
||||
fact that Chrome only has "Save as" via context menu/right-click, not via
|
||||
file menu (toward #192)
|
||||
- Refactoring: Sort Embedded functions alphabetically and add lbs for better
|
||||
visibility in code
|
||||
- Refactoring: Simplify `isValidUnit`
|
||||
- Refactoring( RGBColor) `RGBColor` as class, without rebuilding
|
||||
constants, optimize string replacement, move methods to prototype,
|
||||
use templates and object literals, use `Object.keys`
|
||||
- Refactoring (canvg) Use classes more internally, use shorthand objects;
|
||||
array extras, return to lazy-loading
|
||||
- Refactoring: Use Promises in place of `$.getScript`; always return
|
||||
Promises in case deciding to await resolving
|
||||
- Refactoring: Avoid importing `RGBColor` into `svgutils.js` (jsPDF imports
|
||||
it itself)
|
||||
- Refactoring: Arrow functions, destructuring, shorter property references
|
||||
- Refactoring: Fix `lang` and `dir` for locales (though not in use
|
||||
currently anyways)
|
||||
- Refactoring: Provide path config for canvg, jspdf
|
||||
- Refactoring: Drop code for extension as function (already requiring export
|
||||
to be an object)
|
||||
- Refactoring: Object destructuring, `Object.entries`, Object shorthand,
|
||||
array extras, more camelCase variable names
|
||||
- Refactoring: Add a `Command` base class
|
||||
- Refactoring: Simplify svgicons `callback` ready detection
|
||||
- Refactoring: Put `let` or `const` closer to scope
|
||||
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
|
||||
- Refactoring: Clearer variable names
|
||||
- Refactoring: Use (non-deprecated) Event constructors
|
||||
- Refactoring (minor): variadic args through ellipsis
|
||||
- Refactoring (minor): `getIssues` to return codes and strings, lbs
|
||||
- Refactoring (minor): Use single quotes in PHP
|
||||
- Docs (Code comments): Coding standards within
|
||||
- Docs: Transfer some changes from ExtensionDocs on wiki (need to fully
|
||||
reconcile)
|
||||
- Docs: Reference JSDocs in README
|
||||
- Docs (ReleaseInstructions): Update
|
||||
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki
|
||||
folder; intended for a possible move to Markdown, so raw HTML
|
||||
(with formatting) was not preserved, though named links were carried over
|
||||
with absolute URLs
|
||||
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
|
||||
- Docs: Add Edtior doc file for help to general users
|
||||
- Docs: Clarify/simplify install instructions
|
||||
- Docs: Generally update/improve docs (fixes #92)
|
||||
- Docs: Update links to `latest` path (Avoid needing to update such
|
||||
references upon each release)
|
||||
- Docs: 80 chars max
|
||||
- npm/Docs (JSDoc): Add script to check for overly generic types
|
||||
- Docs (JSDoc): Move jsdoc output to public directory so may be visible
|
||||
on releases (while still having in a `.gitignore`)
|
||||
- Docs (JSDoc): Exclusions
|
||||
- Docs (JSDoc): Add items; fix table layout
|
||||
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials
|
||||
(moved tutorials to own directory to avoid recursion problems by jsdoc)
|
||||
- Docs (JSDoc): Add modules (upper case for usual main entrance files or
|
||||
regular names)
|
||||
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`;
|
||||
consistency with `@returns`
|
||||
- Docs (JSDoc): Use Markdown plugin over HTML
|
||||
- Docs (JSDoc): Add our own layout template to support overflow
|
||||
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
|
||||
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
|
||||
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type
|
||||
of array/function/object
|
||||
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
|
||||
- Linting (ESLint): Avoid linting jsdoc folder
|
||||
- Testing: Use new Sinon
|
||||
|
||||
# 3.0.0-alpha.4
|
||||
|
||||
- Docs: Convert more docs to JSDoc and add JSDoc script (thanks, tetedacier!)
|
||||
- Fix `main` on `package.json` to reference UMD distribution and `module`
|
||||
to point to ES6 Module dist
|
||||
- Fix (regression): Bad name on function passed to `path.js`
|
||||
- Fix (regression): Star tool (radialshift)
|
||||
- Fix (regression): Favicon setting
|
||||
|
||||
# 3.0.0-alpha.3
|
||||
|
||||
- Change: Default to stylesheet above `editor` directory
|
||||
- Docs: Installation steps
|
||||
- Fix regression (Connector extension): Get config object when available
|
||||
- Fix regression (Extensions): Use `extIconsPath` for now given
|
||||
that `extPath` will not work relative to `dist`
|
||||
- Fix regression: Enforce stylesheet ordering sequence
|
||||
- Fix regression: Ensure SVG-edit hidden until stylesheets loaded
|
||||
- Fix regression: Avoid abandoning stylesheet loading if one load fails
|
||||
- Fix (ext-connector): Handle case of 2 connecting elements with
|
||||
same y-coordinate (fixes #210 ; thanks, @iuyiuy!)
|
||||
- Enhancement: Delete the imge upon cancel if it is a new image (fixes #177)
|
||||
- Enhancement: Allow `addSvgElementFromJson` to accept non-SVG namespaces
|
||||
with explicit `namespace` property as well as the default SVG namespace
|
||||
(fixes #155); document
|
||||
- Optimization: For `setSvgString`, if element content is not SVG,
|
||||
return `false` earlier (Fixes #152); thanks iuyiuy!
|
||||
- Demos: Add svgcanvas demo (Neil Fraser)
|
||||
- npm: Update devDeps
|
||||
|
||||
# 3.0.0-alpha.2
|
||||
|
||||
- Licensing: Indicate MIT is license type of rgbcolor and rename
|
||||
file to reflect it; rename/add license file name for jgraduate
|
||||
and screencast to reflect type (Apache 2.0)
|
||||
contains license information (of type MIT) for Raphael icons
|
||||
- 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)
|
||||
- Breaking change: Require `new` with `EmbeddedSVGEdit` (allows us to use `class` internally)
|
||||
- Breaking change: `svgcanvas.setUiStrings` must now be called if not using
|
||||
editor in order to get strings (for sake of i18n) (and if using path.js
|
||||
alone, must also have its `setUiStrings` called)
|
||||
- Breaking change (ext-overview-window): Avoid global `overviewWindowGlobals`
|
||||
- Breaking change (ext-imagelib): Change to object-based encoding for namespacing of
|
||||
messages (though keep stringifying/parsing ourselves until we remove IE9 support)
|
||||
- Breaking change: Rename `jquery.js` to `jquery.min.js`
|
||||
- Breaking change: Remove `scoped` attribute from `style`; it is now deprecated and
|
||||
obsolete; also move to head (after other stylesheets)
|
||||
- Fix: i18nize path.js strings and canvas notifications
|
||||
- Fix: Attempt i18n for ext-markers
|
||||
- Fix: Zoom when scrolled; incorporates #169 (@AndrolGenhald), adapting for conventions; also allow avoidance when shift key pressed
|
||||
- Fix: Update Atom feed reference in HTML
|
||||
- Fix: Broken "lv" locale (and inconsistent tabs/spaces pt-PR)
|
||||
- Fix: Inadvertent global assignments (uncovered by ESLint):
|
||||
* `addBezierCurve` in `canvg.js` had undeclared `i`
|
||||
* Fix: Undeclared variable in opera widget
|
||||
* jgraduate->jpicker: Fix missing `var` for some `i` loops
|
||||
* Fix: Globals (`x`, `y`) in `mouseMove`
|
||||
* Fix: Global (`element`, `d_attr` (now renamed to `dAttr`)) in `mouseDown`
|
||||
* Testing (math_test): Fix undeclared variables
|
||||
* Screencast `showNotes`
|
||||
- Fix: Bad scope closure references
|
||||
* An apparent bug in `jquery.svgicons.js` whereby a variable
|
||||
`holder` was declared in too nested of a scope
|
||||
* Fix: Avoid `drawnPath` not defined error (currently adds as a global, but
|
||||
should be switching to modules anyways)
|
||||
- Fix (jgraduate->jpicker): Fix Color val check when `name.length` is empty
|
||||
(equal to "all")
|
||||
- Fix (jquery.jgraduate.js): Ensure `numstops` is present before check
|
||||
- Fix (history.js) Relocation of rotational transform had undeclared variable (`elem`)
|
||||
- Fix (Editor): Restore save alert
|
||||
- Fix (Firefox svgutils.js): tspan (and textPath apparently) have no `getBBox`
|
||||
in Firefox, so recover (fixes FF issue with recalculate test 3:
|
||||
"recalculateDimensions() on text w/tspan with simple translate")
|
||||
- Fix (Chrome recalculate.js): Chrome has a
|
||||
[bug](https://bugs.chromium.org/p/chromium/issues/detail?id=843901)
|
||||
in not performing `removeAttribute` after `removeItem`; deal with it
|
||||
(though only if there is a single identity matrix) (fixes Chrome issue
|
||||
with recalculate test 1:
|
||||
"recalculateDimensions() on rect with identity matrix")
|
||||
- Fix (HTML): Update assorted links, including using `https://`
|
||||
- Enhancement: ES6 modules (including jQuery plugins, extensions, locales,
|
||||
tests), along with Babel; make Node build routine for converting modular
|
||||
source to non-modular
|
||||
- Enhancement: use `loadStylesheets` for modular stylesheet 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).
|
||||
- Enhancement: Further JSDoc (incomplete)
|
||||
- Enhancement (Project size): Remove now unused Python l10n scripts (#238)
|
||||
- Enhancement (Optimization): Compress images using imageoptim (and add
|
||||
npm script) (per #215)
|
||||
- Enhancement (Editor): Use `https` (instead of `http`) for link default
|
||||
- Enhancement: Throw Error objects instead of strings (including in jgraduate->jpicker)
|
||||
- Enhancement: Make SpinButton plugin independent of SVGEdit via
|
||||
generic state object for `tool_scale`
|
||||
- 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`
|
||||
- npm: Add ESLint, uglify, start scripts
|
||||
- npm: Update devDeps
|
||||
- npm: Add html modules and config build to test script
|
||||
- Docs: Remove "dependencies" comments in code except where summarizing
|
||||
role of jQuery or a non-obvious dependency
|
||||
- Linting: 2 spaces, remove BOM, remove carriage returns, bad characters
|
||||
in Persian locale file
|
||||
- Linting (ESLint): Numerous changes
|
||||
- Refactoring: Switch to ESLint in source
|
||||
- Refactoring: Move scripts to own files
|
||||
- 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)
|
||||
- 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
|
||||
- Refactoring (ext-storage): Move locale info to own file imported by the extension (toward modularity; still should be split into separate files by language and *dynamically* imported, but we'll wait for better `import` support to refactor this)
|
||||
- Refactoring: For imagelib, add local jQuery copy (using old 1.4.4 as had
|
||||
been using from server)
|
||||
- Refactoring: For MathJax, add local copy (using old 2.3 as had been using from
|
||||
server); server had not been working
|
||||
- Refactoring: Remove `use strict` (implicit in modules)
|
||||
- Refactoring: Remove trailing whitespace, fix some code within comments
|
||||
- Refactoring: Expect `jQuery` global rather than `$` for better modularity
|
||||
(also to adapt line later once available via `import`)
|
||||
- Refactoring: Prefer `const` (and then `let`)
|
||||
- Refactoring: Add block scope keywords closer to first block in which they appear
|
||||
- Refactoring: Use ES6 `class`
|
||||
- Refactoring `$.isArray` -> `Array.isArray` and avoid some other jQuery core methods
|
||||
with simple VanillaJS replacements
|
||||
- Refactoring: Use abbreviated object property syntax
|
||||
- Refactoring: Object destructuring
|
||||
- Refactoring: Remove `uiStrings` contents in svg-editor.js (obtains from locale)
|
||||
- Refactoring: Add favicon to embedded API file
|
||||
- Refactoring: Use arrow functions for brief functions (incomplete)
|
||||
- Refactoring: Use `Array.prototype.includes`/`String.prototype.includes`;
|
||||
`String.prototype.startsWith`, `String.prototype.trim`
|
||||
- Refactoring: Remove now unnecessary svgutils do/while resetting of variables
|
||||
- Refactoring: Use shorthand methods for object literals (avoid ": function")
|
||||
- Refactoring: Avoid quoting object property keys where unnecessary
|
||||
- Refactoring: Just do truthy/falsey check for lengths in place of comparison to 0
|
||||
- Refactoring (Testing): Avoid jQuery usage within most test files (defer script,
|
||||
also in preparation for future switch to ES6 modules for tests)
|
||||
- Refactoring: Make jpicker variable declaration indent bearable
|
||||
- Refactoring (Linting): Finish svgcanvas.js
|
||||
- Docs: Mention in comment no longer an entry file as before
|
||||
- Docs: Migrate old config, extensions, and FAQ docs
|
||||
- Build: Update minified version of spinbtn/jgraduate/jpicker per linted/improved files
|
||||
- Testing: Move JavaScript out of HTML to own files
|
||||
- Testing: Add `node-static` to get tests working
|
||||
- Testing: Fix timing of `all_tests.html` for ensuring expanding iframe size to fit content
|
||||
- Testing: Add favicon to test files (also may avoid extra log in console)
|
||||
- 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
|
||||
|
||||
# 3.0.0-alpha.1
|
||||
|
||||
(Only released on npm)
|
||||
|
||||
- Provide `package.json` for npm to reserve name (reflecting current state of `master`)
|
||||
|
||||
# 2.8.1 (Ellipse) - December 2nd, 2015
|
||||
|
||||
For a complete list of changes run:
|
||||
|
@ -6,11 +400,11 @@ For a complete list of changes run:
|
|||
git log 81afaa9..5986f1e
|
||||
```
|
||||
|
||||
* Enhancement: Use `getIntersectionList` when available (<https://github.com/SVG-Edit/svgedit/issues/36>)
|
||||
* Enhancement: Switched to https for all URLs (<https://github.com/SVG-Edit/svgedit/issues/31>)
|
||||
* Enhancement: Minor administrative updates (docs/, README.md, author emails)
|
||||
* Fix: Bug where all icons were broken in Safari (<https://github.com/SVG-Edit/svgedit/issues/29>)
|
||||
* Fix: Updated translations for "page" and "delete" in 57 locales.
|
||||
- Enhancement: Use `getIntersectionList` when available (<https://github.com/SVG-Edit/svgedit/issues/36>)
|
||||
- Enhancement: Switched to https for all URLs (<https://github.com/SVG-Edit/svgedit/issues/31>)
|
||||
- Enhancement: Minor administrative updates (docs/, README.md, author emails)
|
||||
- Fix: Bug where all icons were broken in Safari (<https://github.com/SVG-Edit/svgedit/issues/29>)
|
||||
- Fix: Updated translations for "page" and "delete" in 57 locales.
|
||||
|
||||
# 2.8 (Ellipse) - November 24th, 2015
|
||||
|
||||
|
@ -20,30 +414,30 @@ For a complete list of changes run:
|
|||
git log 4bb15e0..253b4bf
|
||||
```
|
||||
|
||||
* Enhancement (Experimental): Client-side PDF export (issue [#1156](https://code.google.com/p/svg-edit/issues/detail?id=1156)) (to data: URI) and server-side PDF export (where not supported in browser and using ext-server_opensave.js); uses [jsPDF](https://github.com/MrRio/jsPDF) library
|
||||
* Enhancement: For image exports, provided "datauri" property to "exported" event.
|
||||
* Enhancement: Allow config "exportWindowType" of value "new" or "same" to indicate whether to reuse the same export window upon subsequent exports
|
||||
* Enhancement: Added openclipart support to imagelib extension
|
||||
* Enhancement: allow showGrid to be set before load
|
||||
* Enhancement: Support loading of (properly URL encoded) non-base64 "data:image/svg+xml;utf8,"-style data URIs
|
||||
* Enhancement: More clear naming of labels: "Open Image"->"Open SVG" and "Import SVG"->"Import Image" ( issue [#1206](https://code.google.com/p/svg-edit/issues/detail?id=1206))
|
||||
* Enhancement: Included reference to (repository-ignored) custom.css file which once created by the user, as with config.js, allows customization without modifying the repo (its main editor file)
|
||||
* Enhancement: Updated Slovenian locale.
|
||||
* Demo enhancement: Support and demonstrate export in embedded editor
|
||||
* Upgrade: canvg version
|
||||
* Upgrade: Added PathSeg polyfill to workaround pathseg removal in browsers.
|
||||
* Fix: pathtool bug where paths were erroneously deleted.
|
||||
* Fix: Context menu did not work for groups.
|
||||
* Fix: Avoid error in ungrouping function when no elements selected (was impacting MathJax "Ok" button).
|
||||
* Fix: issue [#1205](https://code.google.com/p/svg-edit/issues/detail?id=1205) with Snap to Grid preventing editing
|
||||
* Fix: bug in exportImage if svgEditor.setCustomHandlers calls made
|
||||
* Fix: Ensure "loading..." message closes upon completion or error
|
||||
* Fix: Ensure all dependencies are first available before canvg (and jsPDF) usage
|
||||
* Fix: Allow for empty images
|
||||
* Fix: Minor improvement in display when icon size is set to small
|
||||
* Fix: Based64-encoding issues with Unicode text (e.g., in data URIs or icons)
|
||||
* Fix: 2.7 regression in filesave.php for SVG saving (used by ext-server_opensave.js when client doesn't support the download attribute)
|
||||
* Potentially breaking API changes (subject to further alteration before release):
|
||||
- Enhancement (Experimental): Client-side PDF export (issue [#1156](https://code.google.com/p/svg-edit/issues/detail?id=1156)) (to data: URI) and server-side PDF export (where not supported in browser and using ext-server_opensave.js); uses [jsPDF](https://github.com/MrRio/jsPDF) library
|
||||
- Enhancement: For image exports, provided "datauri" property to "exported" event.
|
||||
- Enhancement: Allow config "exportWindowType" of value "new" or "same" to indicate whether to reuse the same export window upon subsequent exports
|
||||
- Enhancement: Added openclipart support to imagelib extension
|
||||
- Enhancement: allow showGrid to be set before load
|
||||
- Enhancement: Support loading of (properly URL encoded) non-base64 "data:image/svg+xml;utf8,"-style data URIs
|
||||
- Enhancement: More clear naming of labels: "Open Image"->"Open SVG" and "Import SVG"->"Import Image" ( issue [#1206](https://code.google.com/p/svg-edit/issues/detail?id=1206))
|
||||
- Enhancement: Included reference to (repository-ignored) custom.css file which once created by the user, as with config.js, allows customization without modifying the repo (its main editor file)
|
||||
- Enhancement: Updated Slovenian locale.
|
||||
- Demo enhancement: Support and demonstrate export in embedded editor
|
||||
- Upgrade: canvg version
|
||||
- Upgrade: Added PathSeg polyfill to workaround pathseg removal in browsers.
|
||||
- Fix: pathtool bug where paths were erroneously deleted.
|
||||
- Fix: Context menu did not work for groups.
|
||||
- Fix: Avoid error in ungrouping function when no elements selected (was impacting MathJax "Ok" button).
|
||||
- Fix: issue [#1205](https://code.google.com/p/svg-edit/issues/detail?id=1205) with Snap to Grid preventing editing
|
||||
- Fix: bug in exportImage if svgEditor.setCustomHandlers calls made
|
||||
- Fix: Ensure "loading..." message closes upon completion or error
|
||||
- Fix: Ensure all dependencies are first available before canvg (and jsPDF) usage
|
||||
- Fix: Allow for empty images
|
||||
- Fix: Minor improvement in display when icon size is set to small
|
||||
- Fix: Based64-encoding issues with Unicode text (e.g., in data URIs or icons)
|
||||
- Fix: 2.7 regression in filesave.php for SVG saving (used by ext-server_opensave.js when client doesn't support the download attribute)
|
||||
- Potentially breaking API changes (subject to further alteration before release):
|
||||
* Remove 2.7-deprecated "pngsave" (in favor of "exportImage")
|
||||
* Data URIs must be properly URL encoded (use encodeURIComponent() on the "data:..." prefix and double encodeURIComponent() the remaining content)
|
||||
* Remove "paramurl" parameter (use "url" or "source" with a data: URI instead)
|
||||
|
@ -53,147 +447,147 @@ git log 4bb15e0..253b4bf
|
|||
|
||||
# 2.7.1 (applied to 2.7 branch) - April 17, 2014
|
||||
|
||||
* Fix important ID situation with embedded API
|
||||
* Update functions available to embedded editor
|
||||
- Fix important ID situation with embedded API
|
||||
- Update functions available to embedded editor
|
||||
|
||||
# 2.7 (Deltoid curve) - April 7th, 2014
|
||||
|
||||
* Export to PNG, JPEG, BMP, WEBP (including quality control for JPEG/WEBP) for default editor and for the server_opensave extension
|
||||
* Added Star, Polygon, and Panning Extensions r2318 r2319 r2333
|
||||
* Added non-default extension, ext-xdomain-messaging.js, moving cross-domain messaging code (as used by the embedded editor) out of core and requiring, when the extension IS included, that configuration (an array "allowedOrigins") be set in order to allow access by any domain (even same domain).
|
||||
* Cause embedded editor to pass on URL arguments to the child editor (child iframe)
|
||||
* Added default extension, ext-storage.js moving storage setting code into this (optional) extension; contains dialog to ask user whether they wish to utilize local storage for prefs and/or content; provides configuration options to tweak behaviors.
|
||||
* Allow for a new file config.js within the editor folder (but not committed to SVN and ignored) which is always loaded and can be used for supplying configuration which happens early enough to affect URL or user storage configuration, in addition to extension behavior configuration. Provided config-sample.js to indicate types of configuration one could use (see also defaultPrefs, defaultExtensions, and defaultConfig within svg-editor.js )
|
||||
* Added configuration "preventAllURLConfig", "lockExtensions", and/or "preventURLContentLoading" for greater control of what can be configured via URL.
|
||||
* Allow second argument object to setConfig containing "allowInitialUserOverride" booleans to allow for preference config in config.js to be overridden by URL or preferences in user storage; also can supply "overwrite" boolean in 2nd argument object if set to false to prevent overwriting of any prior-set configuration (URL config/pref setting occurs in this manner automatically for security reasons).
|
||||
* Allow server_opensave extension to work wholly client-side (if browser supports the download attribute)
|
||||
* Added WebAppFind extension
|
||||
* Added new php_savefile extension to replace outdated, non-functioning server-save code; requires user to create "savefile_config.php" file and do any validation there (for their own security)
|
||||
* Use addEventListener for 'beforeunload' event so user can add their own if desired
|
||||
* Changed locale behavior to always load from locale file, including English. Allow extensions to add new "langReady" callback which is passed an object with "lang" and "uiStrings" properties whenever the locale data is first made available or changed by the user (this callback will not be invoked until the locale data is available). Extensions can add strings to all locales and utilize this mechanism.
|
||||
* Made fixes impacting path issues and also ext-connector.js
|
||||
* Fixed a bug where the position number supplied on an extension object was too high (e.g., if too few other extensions were included, the extension might not show up because its position was set too high).
|
||||
* Added Polish locale
|
||||
* Zoom features
|
||||
* Make extension paths relative within extensions (issue 1184)
|
||||
* Security improvements and other fixes
|
||||
* Embedded editor can now work same domain without JSON parsing and the consequent potential loss of arguments or return values.
|
||||
* Potentially breaking API changes:
|
||||
** Disallowed "extPath", "imgPath", "langPath", and "jGraduatePath" setting via URL and prevent cross-domain/cross-folder extensions being set by URL (security enhancement)
|
||||
** Deprecated "pngsave" option called by setCustomHandlers() in favor of "exportImage" (to accommodate export of other image types). Second argument will now supply, in addition to "issues" and "svg", the properties "type" (currently 'PNG', 'JPEG', 'BMP', 'WEBP'), "mimeType", and "quality" (for 'JPEG' and 'WEBP' types).
|
||||
** Default extensions will now always load (along with those supplied in the URL unless the latter is prohibited by configuration), so if you do not wish your old code to load all of the default extensions, you will need to add &noDefaultExtensions=true to the URL (or add equivalent configuration in config.js). ext-overview_window.js can now be excluded though it is still a default.
|
||||
** Preferences and configuration options must be within the list supplied within svg-editor.js (should include those of all documented extensions).
|
||||
** Embedded messaging will no longer work by default for privacy/data integrity reasons. One must include the "ext-xdomain-messaging.js" extension and supply an array configuration item, "allowedOrigins" with potential values including: "\*" (to allow all domains--strongly discouraged!), "null" as a string to allow file:// access, window.location.origin (to allow same domain access), or specific trusted origins. The embedded editor works without the extension if the main editor is on the same domain, but if cross-domain control is needed, the "allowedOrigins" array must be supplied by a call to svgEditor.setConfig({allowedOrigins: [origin1, origin2, etc.]}) in the new config.js file.
|
||||
- Export to PNG, JPEG, BMP, WEBP (including quality control for JPEG/WEBP) for default editor and for the server_opensave extension
|
||||
- Added Star, Polygon, and Panning Extensions r2318 r2319 r2333
|
||||
- Added non-default extension, ext-xdomain-messaging.js, moving cross-domain messaging code (as used by the embedded editor) out of core and requiring, when the extension IS included, that configuration (an array "allowedOrigins") be set in order to allow access by any domain (even same domain).
|
||||
- Cause embedded editor to pass on URL arguments to the child editor (child iframe)
|
||||
- Added default extension, ext-storage.js moving storage setting code into this (optional) extension; contains dialog to ask user whether they wish to utilize local storage for prefs and/or content; provides configuration options to tweak behaviors.
|
||||
- Allow for a new file config.js within the editor folder (but not committed to SVN and ignored) which is always loaded and can be used for supplying configuration which happens early enough to affect URL or user storage configuration, in addition to extension behavior configuration. Provided config-sample.js to indicate types of configuration one could use (see also defaultPrefs, defaultExtensions, and defaultConfig within svg-editor.js )
|
||||
- Added configuration "preventAllURLConfig", "lockExtensions", and/or "preventURLContentLoading" for greater control of what can be configured via URL.
|
||||
- Allow second argument object to setConfig containing "allowInitialUserOverride" booleans to allow for preference config in config.js to be overridden by URL or preferences in user storage; also can supply "overwrite" boolean in 2nd argument object if set to false to prevent overwriting of any prior-set configuration (URL config/pref setting occurs in this manner automatically for security reasons).
|
||||
- Allow server_opensave extension to work wholly client-side (if browser supports the download attribute)
|
||||
- Added WebAppFind extension
|
||||
- Added new php_savefile extension to replace outdated, non-functioning server-save code; requires user to create "savefile_config.php" file and do any validation there (for their own security)
|
||||
- Use addEventListener for 'beforeunload' event so user can add their own if desired
|
||||
- Changed locale behavior to always load from locale file, including English. Allow extensions to add new "langReady" callback which is passed an object with "lang" and "uiStrings" properties whenever the locale data is first made available or changed by the user (this callback will not be invoked until the locale data is available). Extensions can add strings to all locales and utilize this mechanism.
|
||||
- Made fixes impacting path issues and also ext-connector.js
|
||||
- Fixed a bug where the position number supplied on an extension object was too high (e.g., if too few other extensions were included, the extension might not show up because its position was set too high).
|
||||
- Added Polish locale
|
||||
- Zoom features
|
||||
- Make extension paths relative within extensions (issue 1184)
|
||||
- Security improvements and other fixes
|
||||
- Embedded editor can now work same domain without JSON parsing and the consequent potential loss of arguments or return values.
|
||||
- Potentially breaking API changes:
|
||||
* Disallowed "extPath", "imgPath", "langPath", and "jGraduatePath" setting via URL and prevent cross-domain/cross-folder extensions being set by URL (security enhancement)
|
||||
* Deprecated "pngsave" option called by setCustomHandlers() in favor of "exportImage" (to accommodate export of other image types). Second argument will now supply, in addition to "issues" and "svg", the properties "type" (currently 'PNG', 'JPEG', 'BMP', 'WEBP'), "mimeType", and "quality" (for 'JPEG' and 'WEBP' types).
|
||||
* Default extensions will now always load (along with those supplied in the URL unless the latter is prohibited by configuration), so if you do not wish your old code to load all of the default extensions, you will need to add `&noDefaultExtensions=true` to the URL (or add equivalent configuration in config.js). ext-overview_window.js can now be excluded though it is still a default.
|
||||
* Preferences and configuration options must be within the list supplied within svg-editor.js (should include those of all documented extensions).
|
||||
* Embedded messaging will no longer work by default for privacy/data integrity reasons. One must include the "ext-xdomain-messaging.js" extension and supply an array configuration item, "allowedOrigins" with potential values including: "\*" (to allow all domains--strongly discouraged!), "null" as a string to allow file:// access, window.location.origin (to allow same domain access), or specific trusted origins. The embedded editor works without the extension if the main editor is on the same domain, but if cross-domain control is needed, the "allowedOrigins" array must be supplied by a call to svgEditor.setConfig({allowedOrigins: [origin1, origin2, etc.]}) in the new config.js file.
|
||||
|
||||
# 2.6 (Cycloid) - January 15th, 2013
|
||||
|
||||
* Support for Internet Explorer 9
|
||||
* Context menu
|
||||
* Cut/Copy/Paste/Paste in Place options
|
||||
* Gridlines, snap to grid
|
||||
* Merge layers
|
||||
* Duplicate layer
|
||||
* Image library
|
||||
* Shape library
|
||||
* Basic Server-based tools for file opening/saving
|
||||
* In-group editing
|
||||
* Cut/Copy/Paste
|
||||
* full list: http://code.google.com/p/svg-edit/issues/list?can=1&q=label%3ANeededFor-2.6
|
||||
- Support for Internet Explorer 9
|
||||
- Context menu
|
||||
- Cut/Copy/Paste/Paste in Place options
|
||||
- Gridlines, snap to grid
|
||||
- Merge layers
|
||||
- Duplicate layer
|
||||
- Image library
|
||||
- Shape library
|
||||
- Basic Server-based tools for file opening/saving
|
||||
- In-group editing
|
||||
- Cut/Copy/Paste
|
||||
- full list: http://code.google.com/p/svg-edit/issues/list?can=1&q=label%3ANeededFor-2.6
|
||||
|
||||
# 2.5 - June 15, 2010
|
||||
|
||||
* Open Local Files (Firefox 3.6+ only)
|
||||
* Import SVG into Drawing (Firefox 3.6+ only)
|
||||
* Ability to create extensions/plugins
|
||||
* Main menu and overal interface improvements
|
||||
* Create and select elements outside the canvas
|
||||
* Base support for the svg:use element
|
||||
* Add/Edit Sub-paths
|
||||
* Multiple path segment selection
|
||||
* Radial Gradient support
|
||||
* Connector lines
|
||||
* Arrows & Markers
|
||||
* Smoother freehand paths
|
||||
* Foreign markup support (ForeignObject?/MathML)
|
||||
* Configurable options
|
||||
* File-loading options
|
||||
* Eye-dropper tool (copy element style)
|
||||
* Stroke linejoin and linecap options
|
||||
* Export to PNG
|
||||
* Blur tool
|
||||
* Page-align single elements
|
||||
* Inline text editing
|
||||
* Line draw snapping with Shift key
|
||||
- Open Local Files (Firefox 3.6+ only)
|
||||
- Import SVG into Drawing (Firefox 3.6+ only)
|
||||
- Ability to create extensions/plugins
|
||||
- Main menu and overall interface improvements
|
||||
- Create and select elements outside the canvas
|
||||
- Base support for the svg:use element
|
||||
- Add/Edit Sub-paths
|
||||
- Multiple path segment selection
|
||||
- Radial Gradient support
|
||||
- Connector lines
|
||||
- Arrows & Markers
|
||||
- Smoother freehand paths
|
||||
- Foreign markup support (ForeignObject?/MathML)
|
||||
- Configurable options
|
||||
- File-loading options
|
||||
- Eye-dropper tool (copy element style)
|
||||
- Stroke linejoin and linecap options
|
||||
- Export to PNG
|
||||
- Blur tool
|
||||
- Page-align single elements
|
||||
- Inline text editing
|
||||
- Line draw snapping with Shift key
|
||||
|
||||
# 2.4 - January 11, 2010
|
||||
|
||||
* Zoom
|
||||
* Layers
|
||||
* UI Localization
|
||||
* Wireframe Mode
|
||||
* Resizable UI (SVG icons)
|
||||
* Set background color and/or image (for tracing)
|
||||
* Convert Shapes to Paths
|
||||
* X, Y coordinates for all elements
|
||||
* Draggable Dialog boxes
|
||||
* Select Non-Adjacent Elements
|
||||
* Fixed-ratio resize
|
||||
* Automatic Tool Switching
|
||||
* Raster Images
|
||||
* Group elements
|
||||
* Add/Remove path nodes
|
||||
* Curved Paths
|
||||
* Floating point values for all attributes
|
||||
* Text fields for all attributes
|
||||
* Title element
|
||||
- Zoom
|
||||
- Layers
|
||||
- UI Localization
|
||||
- Wireframe Mode
|
||||
- Resizable UI (SVG icons)
|
||||
- Set background color and/or image (for tracing)
|
||||
- Convert Shapes to Paths
|
||||
- X, Y coordinates for all elements
|
||||
- Draggable Dialog boxes
|
||||
- Select Non-Adjacent Elements
|
||||
- Fixed-ratio resize
|
||||
- Automatic Tool Switching
|
||||
- Raster Images
|
||||
- Group elements
|
||||
- Add/Remove path nodes
|
||||
- Curved Paths
|
||||
- Floating point values for all attributes
|
||||
- Text fields for all attributes
|
||||
- Title element
|
||||
|
||||
# 2.3 - September 08, 2009
|
||||
|
||||
* Align Objects
|
||||
* Rotate Objects
|
||||
* Clone Objects
|
||||
* Select Next/Prev Object
|
||||
* Edit SVG Source
|
||||
* Gradient picking
|
||||
* Polygon Mode (Path Editing, Phase 1)
|
||||
- Align Objects
|
||||
- Rotate Objects
|
||||
- Clone Objects
|
||||
- Select Next/Prev Object
|
||||
- Edit SVG Source
|
||||
- Gradient picking
|
||||
- Polygon Mode (Path Editing, Phase 1)
|
||||
|
||||
# 2.2 - July 08, 2009
|
||||
|
||||
* Multiselect Mode
|
||||
* Undo/Redo Actions
|
||||
* Resize Elements
|
||||
* Contextual tools for rect, circle, ellipse, line, text elements
|
||||
* Some updated button images
|
||||
* Stretched the UI to fit the browser window
|
||||
* Resizing of the SVG canvas
|
||||
* Upgraded to jPicker 1.0.8
|
||||
- Multiselect Mode
|
||||
- Undo/Redo Actions
|
||||
- Resize Elements
|
||||
- Contextual tools for rect, circle, ellipse, line, text elements
|
||||
- Some updated button images
|
||||
- Stretched the UI to fit the browser window
|
||||
- Resizing of the SVG canvas
|
||||
- Upgraded to jPicker 1.0.8
|
||||
|
||||
# 2.1 - June 17, 2009
|
||||
|
||||
* tooltips added to all UI elements
|
||||
* fix flyout menus
|
||||
* ask before clearing the drawing (suggested by martin.vidner)
|
||||
* control group, fill and stroke opacity
|
||||
* fix flyouts when using color picker
|
||||
* change license from GPLv2 to Apache License v2.0
|
||||
* replaced Farbtastic with jPicker, because of the license issues
|
||||
* removed dependency on svgcanvas.svg, now created in JavaScript
|
||||
* added Select tool
|
||||
* using jQuery hosted by Google instead of local version
|
||||
* allow dragging of elements
|
||||
* save SVG file to separate tab
|
||||
* create and edit text elements
|
||||
* context panel tools
|
||||
* change rect radius, font-family, font-size
|
||||
* added keystroke shortcuts for all tools
|
||||
* move to top/bottom
|
||||
- tooltips added to all UI elements
|
||||
- fix flyout menus
|
||||
- ask before clearing the drawing (suggested by martin.vidner)
|
||||
- control group, fill and stroke opacity
|
||||
- fix flyouts when using color picker
|
||||
- change license from GPLv2 to Apache License v2.0
|
||||
- replaced Farbtastic with jPicker, because of the license issues
|
||||
- removed dependency on svgcanvas.svg, now created in JavaScript
|
||||
- added Select tool
|
||||
- using jQuery hosted by Google instead of local version
|
||||
- allow dragging of elements
|
||||
- save SVG file to separate tab
|
||||
- create and edit text elements
|
||||
- context panel tools
|
||||
- change rect radius, font-family, font-size
|
||||
- added keystroke shortcuts for all tools
|
||||
- move to top/bottom
|
||||
|
||||
# 2.0 - June 03, 2009
|
||||
|
||||
* rewritten SVG-edit, so now it uses OOP
|
||||
* draw ellipse, square
|
||||
* created HTML interface similar to Inkscape
|
||||
- rewritten SVG-edit, so now it uses OOP
|
||||
- draw ellipse, square
|
||||
- created HTML interface similar to Inkscape
|
||||
|
||||
# 1.0 - February 06, 2009
|
||||
|
||||
* SVG-Edit released
|
||||
- SVG-Edit released
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2009-2012 by SVG-edit authors (see AUTHORS file)
|
||||
Copyright (c) 2009-2018 by SVG-edit authors (see AUTHORS file)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
12
Makefile
12
Makefile
|
@ -8,15 +8,15 @@ ZIP=zip
|
|||
# All files that will be compiled by the Closure compiler.
|
||||
|
||||
JS_FILES=\
|
||||
svgedit.js \
|
||||
jquery-svg.js \
|
||||
contextmenu/jquery.contextMenu.js \
|
||||
pathseg.js \
|
||||
namespaces.js \
|
||||
jQuery.attr.js \
|
||||
contextmenu/jQuery.contextMenu.js \
|
||||
svgpathseg.js \
|
||||
browser.js \
|
||||
svgtransformlist.js \
|
||||
math.js \
|
||||
units.js \
|
||||
svgutils.js \
|
||||
utilities.js \
|
||||
sanitize.js \
|
||||
history.js \
|
||||
historyrecording.js \
|
||||
|
@ -93,7 +93,7 @@ chrome:
|
|||
cd build ; $(ZIP) -r $(PACKAGE)-crx.zip svgedit_app ; rm -rf svgedit_app; cd ..
|
||||
|
||||
jgraduate:
|
||||
java -jar $(CLOSURE) --js editor/jgraduate/jquery.jgraduate.js --js_output_file editor/jgraduate/jquery.jgraduate.min.js
|
||||
java -jar $(CLOSURE) --js editor/jgraduate/jquery.jGraduate.js --js_output_file editor/jgraduate/jquery.jgraduate.min.js
|
||||
clean:
|
||||
rm -rf config
|
||||
rm -rf build/$(PACKAGE)
|
||||
|
|
130
README.md
130
README.md
|
@ -1,41 +1,121 @@
|
|||
![alt text](https://svg-edit.github.io/svgedit/images/logo48x48.svg "svg-edit logo of a pencil") SVG-edit
|
||||
===
|
||||
SVG-edit is a fast, web-based, javascript-driven SVG drawing editor that works in any modern browser.
|
||||
# ![alt text](https://svg-edit.github.io/svgedit/images/logo48x48.svg "svg-edit logo of a pencil") SVG-edit
|
||||
|
||||
### [Try SVG-edit here](https://svg-edit.github.io/svgedit/releases/svg-edit-2.8.1/svg-editor.html)
|
||||
SVG-edit is a fast, web-based, JavaScript-driven SVG drawing editor that
|
||||
works in any modern browser.
|
||||
|
||||
(Also available as a [download](https://github.com/SVG-Edit/svgedit/releases/download/svg-edit-2.8.1/svg-edit-2.8.1.zip) in [releases](https://github.com/SVG-Edit/svgedit/releases)).
|
||||
## Demo
|
||||
|
||||
### [Try SVG-edit here](https://svg-edit.github.io/svgedit/releases/latest/editor/svg-editor.html)
|
||||
|
||||
See the [latest release](https://svg-edit.github.io/svgedit/releases/latest/editor/svg-editor.html)
|
||||
(or its [ES6-Module](https://svg-edit.github.io/svgedit/releases/latest/editor/svg-editor.html) version, which requires a modern browser).
|
||||
|
||||
Also available as a download in [releases](https://github.com/SVG-Edit/svgedit/releases).
|
||||
|
||||
For testing the latest version in `master`, you may use <https://rawgit.com/SVG-Edit/svgedit/master/editor/svg-editor.html> or
|
||||
<https://raw.githack.com/SVG-Edit/svgedit/master/editor/svg-editor.html>.
|
||||
|
||||
## Installation
|
||||
|
||||
### Quick install
|
||||
|
||||
1. Clone or copy the repository contents (at least the `editor` directory).
|
||||
1. If you need programmatic customization, see its section below.
|
||||
1. Otherwise, just add an iframe to your site, adding any extensions or
|
||||
configuration (see `docs/tutorials/ConfigOptions.md`
|
||||
([ConfigOptions]{@tutorial ConfigOptions})) within the URL:
|
||||
```html
|
||||
<iframe src="svgedit/editor/svg-editor.html?extensions=" width="100%" height="100%"></iframe>
|
||||
```
|
||||
|
||||
### Integrating SVG-edit into your own npm package
|
||||
|
||||
These steps are only needed if you wish to set up your own npm package
|
||||
incorporating SVGEdit.
|
||||
|
||||
1. Create your npm package: `npm init` (complete the fields).
|
||||
1. Install SVG-edit into your package:
|
||||
`npm i svgedit`.
|
||||
1. Look within `node_modules/svgedit/`, e.g., `node_modules/svgedit/editor/svg-editor.html`
|
||||
for the files your package needs and use accordingly.
|
||||
1. `npm publish`
|
||||
|
||||
## Programmatic customization
|
||||
|
||||
1. If you are not concerned about supporting ES6 Modules (see the
|
||||
"ES6 Modules file" section), you can add your config directly to
|
||||
`svgedit-config-iife.js` within the SVG-Edit project root.
|
||||
1. Note: Do not remove the `import svgEditor...` code which is responsible for
|
||||
importing the SVG edit code. Versions prior to 3.0 did not require this,
|
||||
but the advantage is that your HTML does not need to be polluted with
|
||||
extra script references.
|
||||
1. Modify or utilize any options. See `docs/tutorials/ConfigOptions.md`
|
||||
([ConfigOptions]{@tutorial ConfigOptions}).
|
||||
|
||||
## ES6 Modules file
|
||||
|
||||
1. `svg-editor-es.html` is an HTML file directly using ES6 modules.
|
||||
It is only supported in the latest browsers. It is probably mostly
|
||||
useful for debugging, as it requires more network requests.
|
||||
If you would like to work with this file, you should make configuration
|
||||
changes in `svgedit-config-es.js` (in the SVG-Edit project root).
|
||||
1. If you are working with the ES6 Modules config but also wish to work with
|
||||
the normal `svg-editor.html` version (so your code can work in older
|
||||
browsers or get the presumable performance benefits of this file which
|
||||
references JavaScript rolled up into a single file), you can follow these
|
||||
steps after any config changes you make, so that your changes can also be
|
||||
automatically made available to both versions.
|
||||
1. JavaScript:
|
||||
1. Run `npm install` within the `node_modules/svgedit` directory to
|
||||
install the build tools for SVG-edit.
|
||||
1. Run `npm run build-config` within the `node_modules/svgedit` directory.
|
||||
1. This will rebuild `svgedit-config-iife.js` (applying Babel to allow
|
||||
it to work on older browsers and applying Rollup to build all
|
||||
JavaScript into one file). The file will then contain non-ES6 module
|
||||
JavaScript that can work in older browsers. Note that it bundles all
|
||||
of SVGEdit, so it is to be expected that this file will be much larger
|
||||
in size than the original ES6 config file.
|
||||
1. HTML:
|
||||
1. If you wish to make changes to both HTML files, it is recommended that you
|
||||
work and test on `svg-editor-es.html` and then run `npm run build-html`
|
||||
to have the changes properly copied to `svg-editor.html`.
|
||||
|
||||
## Recent news
|
||||
* 2017-07 Added to Packagist: https://packagist.org/packages/svg-edit/svgedit
|
||||
* 2015-12-02 SVG-edit 2.8.1 was released.
|
||||
* 2015-11-24 SVG-edit 2.8 was released.
|
||||
* 2015-11-24 Code, issue tracking, and docs are being moved to github (previously [code.google.com](https://code.google.com/p/svg-edit)).
|
||||
* 2014-04-17 2.7 and stable branches updated to reflect 2.7.1 important bug fixes for the embedded editor.
|
||||
* 2014-04-07 SVG-edit 2.7 was released.
|
||||
* 2013-01-15 SVG-edit 2.6 was released.
|
||||
|
||||
- 2018-07-31 Published 3.0.0-rc.2 with misc. fixes
|
||||
- 2018-07-19 Published 3.0.0-rc.1 allowing for extensions and locales to be
|
||||
expressed as modules
|
||||
- 2018-05-26 Published 3.0.0-alpha.2 with ES6 Modules support
|
||||
- 2017-07 Added to Packagist: https://packagist.org/packages/svg-edit/svgedit
|
||||
- 2015-12-02 SVG-edit 2.8.1 was released.
|
||||
- 2015-11-24 SVG-edit 2.8 was released.
|
||||
- 2015-11-24 Code, issue tracking, and docs are being moved to github (previously [code.google.com](https://code.google.com/p/svg-edit)).
|
||||
- 2014-04-17 2.7 and stable branches updated to reflect 2.7.1 important bug fixes for the embedded editor.
|
||||
- 2014-04-07 SVG-edit 2.7 was released.
|
||||
- 2013-01-15 SVG-edit 2.6 was released.
|
||||
|
||||
## Videos
|
||||
|
||||
* [SVG-edit 2.4 Part 1](http://www.youtube.com/watch?v=zpC7b1ZJvvM)
|
||||
* [SVG-edit 2.4 Part 2](http://www.youtube.com/watch?v=mDzZEoGUDe8)
|
||||
* [SVG-edit 2.3 Features](http://www.youtube.com/watch?v=RVIcIy5fXOc)
|
||||
* [Introduction to SVG-edit](http://www.youtube.com/watch?v=ZJKmEI06YiY) (Version 2.2)
|
||||
* [SVG-edit 2.4 Part 1](https://www.youtube.com/watch?v=zpC7b1ZJvvM)
|
||||
* [SVG-edit 2.4 Part 2](https://www.youtube.com/watch?v=mDzZEoGUDe8)
|
||||
* [SVG-edit 2.3 Features](https://www.youtube.com/watch?v=RVIcIy5fXOc)
|
||||
* [Introduction to SVG-edit](https://www.youtube.com/watch?v=ZJKmEI06YiY) (Version 2.2)
|
||||
|
||||
## Supported browsers
|
||||
|
||||
The following browsers had been tested for 2.6 or earlier and will probably continue to work with 2.8.
|
||||
* Firefox 1.5+
|
||||
* Opera 9.50+
|
||||
* Safari 4+
|
||||
* Chrome 1+
|
||||
* IE 9+ and Edge
|
||||
The following browsers had been tested for 2.6 or earlier and will probably continue to work with 3.0.
|
||||
|
||||
- Firefox 1.5+
|
||||
- Opera 9.50+
|
||||
- Safari 4+
|
||||
- Chrome 1+
|
||||
- IE 9+ and Edge
|
||||
|
||||
## Further reading and more information
|
||||
|
||||
* See [docs](docs/) for more documentation.
|
||||
* See [docs](docs/) for more documentation. See the [JSDocs for our latest release](https://svg-edit.github.io/svgedit/releases/latest/docs/jsdoc/index.html).
|
||||
* [Acknowledgements](docs/Acknowledgements.md) lists open source projects used in svg-edit.
|
||||
* See [AUTHORS](AUTHORS) file for authors.
|
||||
* [Stackoverflow](http://stackoverflow.com/tags/svg-edit) group.
|
||||
* [StackOverflow](https://stackoverflow.com/tags/svg-edit) group.
|
||||
* Join the [svg-edit mailing list](https://groups.google.com/forum/#!forum/svg-edit).
|
||||
* Join us on `#svg-edit` on `freenode.net` (or use the [web client](http://webchat.freenode.net/?channels=svg-edit)).
|
||||
* Join us on `#svg-edit` on `freenode.net` (or use the [web client](https://webchat.freenode.net/?channels=svg-edit)).
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
/* eslint-env node */
|
||||
const fs = require('promise-fs');
|
||||
|
||||
const filesAndReplacements = [
|
||||
{
|
||||
input: 'editor/svg-editor-es.html',
|
||||
output: 'editor/xdomain-svg-editor-es.html',
|
||||
replacements: [
|
||||
[
|
||||
'<script type="module" src="../svgedit-config-es.js"></script>',
|
||||
`<script type="module" src="xdomain-svgedit-config-es.js"></script>`
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
input: 'editor/xdomain-svg-editor-es.html',
|
||||
output: 'editor/xdomain-svg-editor.html',
|
||||
replacements: [
|
||||
[
|
||||
'<!DOCTYPE html>',
|
||||
`<!DOCTYPE html>
|
||||
<!-- AUTO-GENERATED FROM xdomain-svg-editor-es.html; DO NOT EDIT; use build-html.js to build -->`
|
||||
],
|
||||
[
|
||||
'<script type="module" src="redirect-on-lacking-support.js"></script>',
|
||||
'<script defer="defer" src="../dist/redirect-on-lacking-support.js"></script>'
|
||||
],
|
||||
[
|
||||
'<script type="module" src="xdomain-svgedit-config-es.js"></script>',
|
||||
'<script defer="defer" src="xdomain-svgedit-config-iife.js"></script>'
|
||||
],
|
||||
[
|
||||
'<script src="external/dom-polyfill/dom-polyfill.js"></script>',
|
||||
'<script src="../dist/dom-polyfill.js"></script>'
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
input: 'editor/svg-editor-es.html',
|
||||
output: 'editor/svg-editor.html',
|
||||
replacements: [
|
||||
[
|
||||
'<!DOCTYPE html>',
|
||||
`<!DOCTYPE html>
|
||||
<!-- AUTO-GENERATED FROM svg-editor-es.html; DO NOT EDIT; use build-html.js to build -->`
|
||||
],
|
||||
[
|
||||
'<script type="module" src="redirect-on-lacking-support.js"></script>',
|
||||
'<script defer="defer" src="../dist/redirect-on-lacking-support.js"></script>'
|
||||
],
|
||||
[
|
||||
'<script type="module" src="../svgedit-config-es.js"></script>',
|
||||
'<script defer="defer" src="../svgedit-config-iife.js"></script>'
|
||||
],
|
||||
[
|
||||
'<script src="external/dom-polyfill/dom-polyfill.js"></script>',
|
||||
'<script src="../dist/dom-polyfill.js"></script>'
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
input: 'editor/extensions/imagelib/index-es.html',
|
||||
output: 'editor/extensions/imagelib/index.html',
|
||||
replacements: [
|
||||
[
|
||||
'<!DOCTYPE html>',
|
||||
`<!DOCTYPE html>
|
||||
<!-- AUTO-GENERATED FROM imagelib/index-es.html; DO NOT EDIT; use build-html.js to build -->`
|
||||
],
|
||||
[
|
||||
'<script type="module" src="index.js"></script>',
|
||||
'<script defer="defer" src="../../../dist/extensions/imagelib/index.js"></script>'
|
||||
]
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
filesAndReplacements.reduce((p, {input, output, replacements}) => {
|
||||
return p.then(async () => {
|
||||
let data;
|
||||
try {
|
||||
data = await fs.readFile(input, 'utf8');
|
||||
} catch (err) {
|
||||
console.log(`Error reading ${input} file`, err);
|
||||
}
|
||||
|
||||
data = replacements.reduce((s, [find, replacement]) => {
|
||||
return s.replace(find, replacement);
|
||||
}, data);
|
||||
|
||||
try {
|
||||
await fs.writeFile(output, data);
|
||||
} catch (err) {
|
||||
console.log(`Error writing file: ${err}`, err);
|
||||
return;
|
||||
}
|
||||
console.log(`Completed file ${input} rewriting!`);
|
||||
});
|
||||
}, Promise.resolve()).then(() => {
|
||||
console.log('Finished!');
|
||||
});
|
|
@ -121,7 +121,6 @@ def parseComment(line, line_num, enabled_flags):
|
|||
|
||||
return line
|
||||
|
||||
|
||||
def ship(inFileName, enabled_flags):
|
||||
# read in HTML file
|
||||
lines = file(inFileName, 'r').readlines()
|
||||
|
@ -141,7 +140,7 @@ def ship(inFileName, enabled_flags):
|
|||
else: # else append line to the output list
|
||||
out_lines.append(line)
|
||||
i += 1
|
||||
|
||||
|
||||
return ''.join(out_lines)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -3,24 +3,28 @@
|
|||
"description": "SVG-edit is a fast, web-based, javascript-driven SVG drawing editor that works in any modern browser.",
|
||||
"authors": [
|
||||
{
|
||||
"name":"Narendra Sisodiya",
|
||||
"name": "Narendra Sisodiya",
|
||||
"email": "narendra@narendrasisodiya.com"
|
||||
},
|
||||
{
|
||||
"name":"Pavol Rusnak",
|
||||
"name": "Pavol Rusnak",
|
||||
"email": "stick@gk2.sk"
|
||||
},
|
||||
{
|
||||
"name":"Jeff Schiller",
|
||||
"name": "Jeff Schiller",
|
||||
"email": "codedread@gmail.com"
|
||||
},
|
||||
{
|
||||
"name":"Vidar Hokstad",
|
||||
"name": "Vidar Hokstad",
|
||||
"email": "vidar.hokstad@gmail.com"
|
||||
},
|
||||
{
|
||||
"name":"Alexis Deveria",
|
||||
"name": "Alexis Deveria",
|
||||
"email": "adeveria@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Brett Zamir",
|
||||
"email": "brettz9@yahoo.com"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Minimal demo of SvgCanvas</title>
|
||||
<script src="../editor/jquery.min.js"></script>
|
||||
<script src="../editor/jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
|
||||
<style> #svgroot { overflow: hidden; } </style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Minimal demo of SvgCanvas</h1>
|
||||
|
||||
<div id="editorContainer"></div>
|
||||
|
||||
<div>
|
||||
[<button onclick="canvas.setMode('select')">Select</button>
|
||||
<button onclick="canvas.setMode('circle')">Circle</button>
|
||||
<button onclick="canvas.setMode('rect')">Rect</button>]
|
||||
<button onclick="fill('#ff0000')">Fill Red</button>
|
||||
<button onclick="canvas.deleteSelectedElements()">Delete Selected</button>
|
||||
<button onclick="canvas.clear(); canvas.updateCanvas(width, height);">Clear All</button>
|
||||
<button onclick="alert(canvas.getSvgString())">Get SVG</button>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import Canvas from '../editor/svgcanvas.js';
|
||||
|
||||
const container = document.querySelector('#editorContainer');
|
||||
const {width, height} = {width: 500, height: 300};
|
||||
window.width = width;
|
||||
window.height = height;
|
||||
|
||||
const config = {
|
||||
initFill: {color: 'FFFFFF', opacity: 1},
|
||||
initStroke: {color: '000000', opacity: 1, width: 1},
|
||||
text: {stroke_width: 0, font_size: 24, font_family: 'serif'},
|
||||
initOpacity: 1,
|
||||
imgPath: 'editor/images/',
|
||||
dimensions: [width, height],
|
||||
baseUnit: 'px',
|
||||
};
|
||||
|
||||
window.canvas = new Canvas(container, config);
|
||||
canvas.updateCanvas(width, height);
|
||||
|
||||
window.fill = function (colour) {
|
||||
canvas.getSelectedElems().forEach((el) => {
|
||||
el.setAttribute('fill', colour);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,124 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
// From https://github.com/inexorabletash/polyfill/blob/master/dom.js
|
||||
|
||||
function mixin(o, ps) {
|
||||
if (!o) return;
|
||||
Object.keys(ps).forEach(function (p) {
|
||||
if (p in o || p in o.prototype) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Object.defineProperty(o.prototype, p, Object.getOwnPropertyDescriptor(ps, p));
|
||||
} catch (ex) {
|
||||
// Throws in IE8; just copy it
|
||||
o[p] = ps[p];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function convertNodesIntoANode(nodes) {
|
||||
nodes = nodes.map(function (node) {
|
||||
return !(node instanceof Node) ? document.createTextNode(node) : node;
|
||||
});
|
||||
if (nodes.length === 1) {
|
||||
return nodes[0];
|
||||
}
|
||||
var node = document.createDocumentFragment();
|
||||
nodes.forEach(function (n) {
|
||||
node.appendChild(n);
|
||||
});
|
||||
return node;
|
||||
}
|
||||
|
||||
var ParentNode = {
|
||||
prepend: function prepend() {
|
||||
for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
nodes[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
nodes = convertNodesIntoANode(nodes);
|
||||
this.insertBefore(nodes, this.firstChild);
|
||||
},
|
||||
append: function append() {
|
||||
for (var _len2 = arguments.length, nodes = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
nodes[_key2] = arguments[_key2];
|
||||
}
|
||||
|
||||
nodes = convertNodesIntoANode(nodes);
|
||||
this.appendChild(nodes);
|
||||
}
|
||||
};
|
||||
|
||||
mixin(Document || HTMLDocument, ParentNode); // HTMLDocument for IE8
|
||||
mixin(DocumentFragment, ParentNode);
|
||||
mixin(Element, ParentNode);
|
||||
|
||||
// Mixin ChildNode
|
||||
// https://dom.spec.whatwg.org/#interface-childnode
|
||||
|
||||
var ChildNode = {
|
||||
before: function before() {
|
||||
var parent = this.parentNode;
|
||||
if (!parent) return;
|
||||
var viablePreviousSibling = this.previousSibling;
|
||||
|
||||
for (var _len3 = arguments.length, nodes = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
||||
nodes[_key3] = arguments[_key3];
|
||||
}
|
||||
|
||||
while (nodes.includes(viablePreviousSibling)) {
|
||||
viablePreviousSibling = viablePreviousSibling.previousSibling;
|
||||
}
|
||||
var node = convertNodesIntoANode(nodes);
|
||||
parent.insertBefore(node, viablePreviousSibling ? viablePreviousSibling.nextSibling : parent.firstChild);
|
||||
},
|
||||
after: function after() {
|
||||
var parent = this.parentNode;
|
||||
if (!parent) return;
|
||||
var viableNextSibling = this.nextSibling;
|
||||
|
||||
for (var _len4 = arguments.length, nodes = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
||||
nodes[_key4] = arguments[_key4];
|
||||
}
|
||||
|
||||
while (nodes.includes(viableNextSibling)) {
|
||||
viableNextSibling = viableNextSibling.nextSibling;
|
||||
}
|
||||
var node = convertNodesIntoANode(nodes);
|
||||
parent.insertBefore(node, viableNextSibling);
|
||||
},
|
||||
replaceWith: function replaceWith() {
|
||||
var parent = this.parentNode;
|
||||
if (!parent) return;
|
||||
var viableNextSibling = this.nextSibling;
|
||||
|
||||
for (var _len5 = arguments.length, nodes = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
||||
nodes[_key5] = arguments[_key5];
|
||||
}
|
||||
|
||||
while (nodes.includes(viableNextSibling)) {
|
||||
viableNextSibling = viableNextSibling.nextSibling;
|
||||
}
|
||||
var node = convertNodesIntoANode(nodes);
|
||||
|
||||
if (this.parentNode === parent) {
|
||||
parent.replaceChild(node, this);
|
||||
} else {
|
||||
parent.insertBefore(node, viableNextSibling);
|
||||
}
|
||||
},
|
||||
remove: function remove() {
|
||||
if (!this.parentNode) {
|
||||
return;
|
||||
}
|
||||
this.parentNode.removeChild(this);
|
||||
}
|
||||
};
|
||||
|
||||
mixin(DocumentType, ChildNode);
|
||||
mixin(Element, ChildNode);
|
||||
mixin(CharacterData, ChildNode);
|
||||
|
||||
}());
|
|
@ -0,0 +1,369 @@
|
|||
var svgEditorExtension_arrows = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-arrows.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
var extArrows = {
|
||||
name: 'arrows',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(S) {
|
||||
var strings, svgEditor, svgCanvas, $, addElem, nonce, prefix, selElems, arrowprefix, randomizeIds, setArrowNonce, unsetArrowNonce, pathdata, getLinked, showPanel, resetMarker, addMarker, setArrow, colorChanged, contextTools;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
colorChanged = function colorChanged(elem) {
|
||||
var color = elem.getAttribute('stroke');
|
||||
var mtypes = ['start', 'mid', 'end'];
|
||||
var defs = svgCanvas.findDefs();
|
||||
|
||||
$.each(mtypes, function (i, type) {
|
||||
var marker = getLinked(elem, 'marker-' + type);
|
||||
if (!marker) {
|
||||
return;
|
||||
}
|
||||
|
||||
var curColor = $(marker).children().attr('fill');
|
||||
var curD = $(marker).children().attr('d');
|
||||
if (curColor === color) {
|
||||
return;
|
||||
}
|
||||
|
||||
var allMarkers = $(defs).find('marker');
|
||||
var newMarker = null;
|
||||
// Different color, check if already made
|
||||
allMarkers.each(function () {
|
||||
var attrs = $(this).children().attr(['fill', 'd']);
|
||||
if (attrs.fill === color && attrs.d === curD) {
|
||||
// Found another marker with this color and this path
|
||||
newMarker = this;
|
||||
}
|
||||
});
|
||||
|
||||
if (!newMarker) {
|
||||
// Create a new marker with this color
|
||||
var lastId = marker.id;
|
||||
var dir = lastId.includes('_fw') ? 'fw' : 'bk';
|
||||
|
||||
newMarker = addMarker(dir, type, arrowprefix + dir + allMarkers.length);
|
||||
|
||||
$(newMarker).children().attr('fill', color);
|
||||
}
|
||||
|
||||
$(elem).attr('marker-' + type, 'url(#' + newMarker.id + ')');
|
||||
|
||||
// Check if last marker can be removed
|
||||
var remove = true;
|
||||
$(S.svgcontent).find('line, polyline, path, polygon').each(function () {
|
||||
var elem = this;
|
||||
$.each(mtypes, function (j, mtype) {
|
||||
if ($(elem).attr('marker-' + mtype) === 'url(#' + marker.id + ')') {
|
||||
remove = false;
|
||||
return remove;
|
||||
}
|
||||
});
|
||||
if (!remove) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Not found, so can safely remove
|
||||
if (remove) {
|
||||
$(marker).remove();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
setArrow = function setArrow() {
|
||||
resetMarker();
|
||||
|
||||
var type = this.value;
|
||||
if (type === 'none') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set marker on element
|
||||
var dir = 'fw';
|
||||
if (type === 'mid_bk') {
|
||||
type = 'mid';
|
||||
dir = 'bk';
|
||||
} else if (type === 'both') {
|
||||
addMarker('bk', type);
|
||||
svgCanvas.changeSelectedAttribute('marker-start', 'url(#' + pathdata.bk.id + ')');
|
||||
type = 'end';
|
||||
dir = 'fw';
|
||||
} else if (type === 'start') {
|
||||
dir = 'bk';
|
||||
}
|
||||
|
||||
addMarker(dir, type);
|
||||
svgCanvas.changeSelectedAttribute('marker-' + type, 'url(#' + pathdata[dir].id + ')');
|
||||
svgCanvas.call('changed', selElems);
|
||||
};
|
||||
|
||||
addMarker = function addMarker(dir, type, id) {
|
||||
// TODO: Make marker (or use?) per arrow type, since refX can be different
|
||||
id = id || arrowprefix + dir;
|
||||
|
||||
var data = pathdata[dir];
|
||||
|
||||
if (type === 'mid') {
|
||||
data.refx = 5;
|
||||
}
|
||||
|
||||
var marker = svgCanvas.getElem(id);
|
||||
if (!marker) {
|
||||
marker = addElem({
|
||||
element: 'marker',
|
||||
attr: {
|
||||
viewBox: '0 0 10 10',
|
||||
id: id,
|
||||
refY: 5,
|
||||
markerUnits: 'strokeWidth',
|
||||
markerWidth: 5,
|
||||
markerHeight: 5,
|
||||
orient: 'auto',
|
||||
style: 'pointer-events:none' // Currently needed for Opera
|
||||
}
|
||||
});
|
||||
var arrow = addElem({
|
||||
element: 'path',
|
||||
attr: {
|
||||
d: data.d,
|
||||
fill: '#000000'
|
||||
}
|
||||
});
|
||||
marker.append(arrow);
|
||||
svgCanvas.findDefs().append(marker);
|
||||
}
|
||||
|
||||
marker.setAttribute('refX', data.refx);
|
||||
|
||||
return marker;
|
||||
};
|
||||
|
||||
resetMarker = function resetMarker() {
|
||||
var el = selElems[0];
|
||||
el.removeAttribute('marker-start');
|
||||
el.removeAttribute('marker-mid');
|
||||
el.removeAttribute('marker-end');
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
$('#arrow_panel').toggle(on);
|
||||
if (on) {
|
||||
var el = selElems[0];
|
||||
var end = el.getAttribute('marker-end');
|
||||
var start = el.getAttribute('marker-start');
|
||||
var mid = el.getAttribute('marker-mid');
|
||||
var val = void 0;
|
||||
if (end && start) {
|
||||
val = 'both';
|
||||
} else if (end) {
|
||||
val = 'end';
|
||||
} else if (start) {
|
||||
val = 'start';
|
||||
} else if (mid) {
|
||||
val = 'mid';
|
||||
if (mid.includes('bk')) {
|
||||
val = 'mid_bk';
|
||||
}
|
||||
}
|
||||
|
||||
if (!start && !mid && !end) {
|
||||
val = 'none';
|
||||
}
|
||||
|
||||
$('#arrow_list').val(val);
|
||||
}
|
||||
};
|
||||
|
||||
getLinked = function getLinked(elem, attr) {
|
||||
var str = elem.getAttribute(attr);
|
||||
if (!str) {
|
||||
return null;
|
||||
}
|
||||
var m = str.match(/\(#(.*)\)/);
|
||||
if (!m || m.length !== 2) {
|
||||
return null;
|
||||
}
|
||||
return svgCanvas.getElem(m[1]);
|
||||
};
|
||||
|
||||
unsetArrowNonce = function unsetArrowNonce(window) {
|
||||
randomizeIds = false;
|
||||
arrowprefix = prefix;
|
||||
pathdata.fw.id = arrowprefix + 'fw';
|
||||
pathdata.bk.id = arrowprefix + 'bk';
|
||||
};
|
||||
|
||||
setArrowNonce = function setArrowNonce(window, n) {
|
||||
randomizeIds = true;
|
||||
arrowprefix = prefix + n + '_';
|
||||
pathdata.fw.id = arrowprefix + 'fw';
|
||||
pathdata.bk.id = arrowprefix + 'bk';
|
||||
};
|
||||
|
||||
_context2.next = 10;
|
||||
return S.importLocale();
|
||||
|
||||
case 10:
|
||||
strings = _context2.sent;
|
||||
svgEditor = this;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
$ = jQuery;
|
||||
// {svgcontent} = S,
|
||||
addElem = svgCanvas.addSVGElementFromJson, nonce = S.nonce, prefix = 'se_arrow_';
|
||||
selElems = void 0, arrowprefix = void 0, randomizeIds = S.randomize_ids;
|
||||
|
||||
|
||||
svgCanvas.bind('setnonce', setArrowNonce);
|
||||
svgCanvas.bind('unsetnonce', unsetArrowNonce);
|
||||
|
||||
if (randomizeIds) {
|
||||
arrowprefix = prefix + nonce + '_';
|
||||
} else {
|
||||
arrowprefix = prefix;
|
||||
}
|
||||
|
||||
pathdata = {
|
||||
fw: { d: 'm0,0l10,5l-10,5l5,-5l-5,-5z', refx: 8, id: arrowprefix + 'fw' },
|
||||
bk: { d: 'm10,0l-10,5l10,5l-5,-5l5,-5z', refx: 2, id: arrowprefix + 'bk' }
|
||||
};
|
||||
contextTools = [{
|
||||
type: 'select',
|
||||
panel: 'arrow_panel',
|
||||
id: 'arrow_list',
|
||||
defval: 'none',
|
||||
events: {
|
||||
change: setArrow
|
||||
}
|
||||
}];
|
||||
return _context2.abrupt('return', {
|
||||
name: strings.name,
|
||||
context_tools: strings.contextTools.map(function (contextTool, i) {
|
||||
return Object.assign(contextTools[i], contextTool);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('#arrow_panel').hide();
|
||||
// Set ID so it can be translated in locale file
|
||||
$('#arrow_list option')[0].id = 'connector_no_arrow';
|
||||
},
|
||||
addLangData: function () {
|
||||
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref2) {
|
||||
var lang = _ref2.lang,
|
||||
importLocale = _ref2.importLocale;
|
||||
var strings;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return importLocale();
|
||||
|
||||
case 2:
|
||||
strings = _context.sent;
|
||||
return _context.abrupt('return', {
|
||||
data: strings.langList
|
||||
});
|
||||
|
||||
case 4:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function addLangData(_x2) {
|
||||
return _ref3.apply(this, arguments);
|
||||
}
|
||||
|
||||
return addLangData;
|
||||
}(),
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// Use this to update the current selected elements
|
||||
selElems = opts.elems;
|
||||
|
||||
var markerElems = ['line', 'path', 'polyline', 'polygon'];
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && markerElems.includes(elem.tagName)) {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
var elem = opts.elems[0];
|
||||
if (elem && (elem.getAttribute('marker-start') || elem.getAttribute('marker-mid') || elem.getAttribute('marker-end'))) {
|
||||
// const start = elem.getAttribute('marker-start');
|
||||
// const mid = elem.getAttribute('marker-mid');
|
||||
// const end = elem.getAttribute('marker-end');
|
||||
// Has marker, so see if it should match color
|
||||
colorChanged(elem);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
case 22:
|
||||
case 'end':
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extArrows;
|
||||
|
||||
}());
|
|
@ -0,0 +1,164 @@
|
|||
var svgEditorExtension_closepath = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-closepath.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Jeff Schiller
|
||||
*
|
||||
*/
|
||||
|
||||
// This extension adds a simple button to the contextual panel for paths
|
||||
// The button toggles whether the path is open or closed
|
||||
var extClosepath = {
|
||||
name: 'closepath',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, $, svgEditor, selElems, updateButton, showPanel, toggleClosed, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return importLocale();
|
||||
|
||||
case 2:
|
||||
strings = _context.sent;
|
||||
$ = jQuery;
|
||||
svgEditor = this;
|
||||
selElems = void 0;
|
||||
|
||||
updateButton = function updateButton(path) {
|
||||
var seglist = path.pathSegList,
|
||||
closed = seglist.getItem(seglist.numberOfItems - 1).pathSegType === 1,
|
||||
showbutton = closed ? '#tool_openpath' : '#tool_closepath',
|
||||
hidebutton = closed ? '#tool_closepath' : '#tool_openpath';
|
||||
$(hidebutton).hide();
|
||||
$(showbutton).show();
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
$('#closepath_panel').toggle(on);
|
||||
if (on) {
|
||||
var path = selElems[0];
|
||||
if (path) {
|
||||
updateButton(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
toggleClosed = function toggleClosed() {
|
||||
var path = selElems[0];
|
||||
if (path) {
|
||||
var seglist = path.pathSegList,
|
||||
last = seglist.numberOfItems - 1;
|
||||
// is closed
|
||||
if (seglist.getItem(last).pathSegType === 1) {
|
||||
seglist.removeItem(last);
|
||||
} else {
|
||||
seglist.appendItem(path.createSVGPathSegClosePath());
|
||||
}
|
||||
updateButton(path);
|
||||
}
|
||||
};
|
||||
|
||||
buttons = [{
|
||||
id: 'tool_openpath',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'openpath.png',
|
||||
type: 'context',
|
||||
panel: 'closepath_panel',
|
||||
events: {
|
||||
click: function click() {
|
||||
toggleClosed();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: 'tool_closepath',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'closepath.png',
|
||||
type: 'context',
|
||||
panel: 'closepath_panel',
|
||||
events: {
|
||||
click: function click() {
|
||||
toggleClosed();
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'closepath_icons.svg',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('#closepath_panel').hide();
|
||||
},
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
selElems = opts.elems;
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && elem.tagName === 'path') {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
case 11:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extClosepath;
|
||||
|
||||
}());
|
|
@ -0,0 +1,683 @@
|
|||
var svgEditorExtension_connector = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-connector.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
var extConnector = {
|
||||
name: 'connector',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(S) {
|
||||
var $, svgEditor, svgCanvas, getElem, svgroot, importLocale, addElem, selManager, connSel, elData, strings, startX, startY, curLine, startElem, endElem, seNs, svgcontent, started, connections, selElems, getBBintersect, getOffset, showPanel, setPoint, updateLine, findConnectors, updateConnectors, init, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
init = function init() {
|
||||
// Make sure all connectors have data set
|
||||
$(svgcontent).find('*').each(function () {
|
||||
var conn = this.getAttributeNS(seNs, 'connector');
|
||||
if (conn) {
|
||||
this.setAttribute('class', connSel.substr(1));
|
||||
var connData = conn.split(' ');
|
||||
var sbb = svgCanvas.getStrokedBBox([getElem(connData[0])]);
|
||||
var ebb = svgCanvas.getStrokedBBox([getElem(connData[1])]);
|
||||
$(this).data('c_start', connData[0]).data('c_end', connData[1]).data('start_bb', sbb).data('end_bb', ebb);
|
||||
svgCanvas.getEditorNS(true);
|
||||
}
|
||||
});
|
||||
// updateConnectors();
|
||||
};
|
||||
|
||||
updateConnectors = function updateConnectors(elems) {
|
||||
// Updates connector lines based on selected elements
|
||||
// Is not used on mousemove, as it runs getStrokedBBox every time,
|
||||
// which isn't necessary there.
|
||||
findConnectors(elems);
|
||||
if (connections.length) {
|
||||
// Update line with element
|
||||
var i = connections.length;
|
||||
while (i--) {
|
||||
var conn = connections[i];
|
||||
var line = conn.connector;
|
||||
var elem = conn.elem;
|
||||
|
||||
// const sw = line.getAttribute('stroke-width') * 5;
|
||||
|
||||
var pre = conn.is_start ? 'start' : 'end';
|
||||
|
||||
// Update bbox for this element
|
||||
var bb = svgCanvas.getStrokedBBox([elem]);
|
||||
bb.x = conn.start_x;
|
||||
bb.y = conn.start_y;
|
||||
elData(line, pre + '_bb', bb);
|
||||
/* const addOffset = */elData(line, pre + '_off');
|
||||
|
||||
var altPre = conn.is_start ? 'end' : 'start';
|
||||
|
||||
// Get center pt of connected element
|
||||
var bb2 = elData(line, altPre + '_bb');
|
||||
var srcX = bb2.x + bb2.width / 2;
|
||||
var srcY = bb2.y + bb2.height / 2;
|
||||
|
||||
// Set point of element being moved
|
||||
var pt = getBBintersect(srcX, srcY, bb, getOffset(pre, line));
|
||||
setPoint(line, conn.is_start ? 0 : 'end', pt.x, pt.y, true);
|
||||
|
||||
// Set point of connected element
|
||||
var pt2 = getBBintersect(pt.x, pt.y, elData(line, altPre + '_bb'), getOffset(altPre, line));
|
||||
setPoint(line, conn.is_start ? 'end' : 0, pt2.x, pt2.y, true);
|
||||
|
||||
// Update points attribute manually for webkit
|
||||
if (navigator.userAgent.includes('AppleWebKit')) {
|
||||
var pts = line.points;
|
||||
var len = pts.numberOfItems;
|
||||
var ptArr = [];
|
||||
for (var j = 0; j < len; j++) {
|
||||
pt = pts.getItem(j);
|
||||
ptArr[j] = pt.x + ',' + pt.y;
|
||||
}
|
||||
line.setAttribute('points', ptArr.join(' '));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
findConnectors = function findConnectors() {
|
||||
var elems = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selElems;
|
||||
|
||||
var connectors = $(svgcontent).find(connSel);
|
||||
connections = [];
|
||||
|
||||
// Loop through connectors to see if one is connected to the element
|
||||
connectors.each(function () {
|
||||
var addThis = void 0;
|
||||
function add() {
|
||||
if (elems.includes(this)) {
|
||||
// Pretend this element is selected
|
||||
addThis = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Grab the ends
|
||||
var parts = [];
|
||||
['start', 'end'].forEach(function (pos, i) {
|
||||
var key = 'c_' + pos;
|
||||
var part = elData(this, key);
|
||||
if (part == null) {
|
||||
part = document.getElementById(this.attributes['se:connector'].value.split(' ')[i]);
|
||||
elData(this, 'c_' + pos, part.id);
|
||||
elData(this, pos + '_bb', svgCanvas.getStrokedBBox([part]));
|
||||
} else part = document.getElementById(part);
|
||||
parts.push(part);
|
||||
}.bind(this));
|
||||
|
||||
for (var i = 0; i < 2; i++) {
|
||||
var cElem = parts[i];
|
||||
|
||||
addThis = false;
|
||||
// The connected element might be part of a selected group
|
||||
$(cElem).parents().each(add);
|
||||
|
||||
if (!cElem || !cElem.parentNode) {
|
||||
$(this).remove();
|
||||
continue;
|
||||
}
|
||||
if (elems.includes(cElem) || addThis) {
|
||||
var bb = svgCanvas.getStrokedBBox([cElem]);
|
||||
connections.push({
|
||||
elem: cElem,
|
||||
connector: this,
|
||||
is_start: i === 0,
|
||||
start_x: bb.x,
|
||||
start_y: bb.y
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
updateLine = function updateLine(diffX, diffY) {
|
||||
// Update line with element
|
||||
var i = connections.length;
|
||||
while (i--) {
|
||||
var conn = connections[i];
|
||||
var line = conn.connector;
|
||||
// const {elem} = conn;
|
||||
|
||||
var pre = conn.is_start ? 'start' : 'end';
|
||||
// const sw = line.getAttribute('stroke-width') * 5;
|
||||
|
||||
// Update bbox for this element
|
||||
var bb = elData(line, pre + '_bb');
|
||||
bb.x = conn.start_x + diffX;
|
||||
bb.y = conn.start_y + diffY;
|
||||
elData(line, pre + '_bb', bb);
|
||||
|
||||
var altPre = conn.is_start ? 'end' : 'start';
|
||||
|
||||
// Get center pt of connected element
|
||||
var bb2 = elData(line, altPre + '_bb');
|
||||
var srcX = bb2.x + bb2.width / 2;
|
||||
var srcY = bb2.y + bb2.height / 2;
|
||||
|
||||
// Set point of element being moved
|
||||
var pt = getBBintersect(srcX, srcY, bb, getOffset(pre, line)); // $(line).data(pre+'_off')?sw:0
|
||||
setPoint(line, conn.is_start ? 0 : 'end', pt.x, pt.y, true);
|
||||
|
||||
// Set point of connected element
|
||||
var pt2 = getBBintersect(pt.x, pt.y, elData(line, altPre + '_bb'), getOffset(altPre, line));
|
||||
setPoint(line, conn.is_start ? 'end' : 0, pt2.x, pt2.y, true);
|
||||
}
|
||||
};
|
||||
|
||||
setPoint = function setPoint(elem, pos, x, y, setMid) {
|
||||
var pts = elem.points;
|
||||
var pt = svgroot.createSVGPoint();
|
||||
pt.x = x;
|
||||
pt.y = y;
|
||||
if (pos === 'end') {
|
||||
pos = pts.numberOfItems - 1;
|
||||
}
|
||||
// TODO: Test for this on init, then use alt only if needed
|
||||
try {
|
||||
pts.replaceItem(pt, pos);
|
||||
} catch (err) {
|
||||
// Should only occur in FF which formats points attr as "n,n n,n", so just split
|
||||
var ptArr = elem.getAttribute('points').split(' ');
|
||||
for (var i = 0; i < ptArr.length; i++) {
|
||||
if (i === pos) {
|
||||
ptArr[i] = x + ',' + y;
|
||||
}
|
||||
}
|
||||
elem.setAttribute('points', ptArr.join(' '));
|
||||
}
|
||||
|
||||
if (setMid) {
|
||||
// Add center point
|
||||
var ptStart = pts.getItem(0);
|
||||
var ptEnd = pts.getItem(pts.numberOfItems - 1);
|
||||
setPoint(elem, 1, (ptEnd.x + ptStart.x) / 2, (ptEnd.y + ptStart.y) / 2);
|
||||
}
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
var connRules = $('#connector_rules');
|
||||
if (!connRules.length) {
|
||||
connRules = $('<style id="connector_rules"></style>').appendTo('head');
|
||||
}
|
||||
connRules.text(!on ? '' : '#tool_clone, #tool_topath, #tool_angle, #xy_panel { display: none !important; }');
|
||||
$('#connector_panel').toggle(on);
|
||||
};
|
||||
|
||||
getOffset = function getOffset(side, line) {
|
||||
var giveOffset = !!line.getAttribute('marker-' + side);
|
||||
// const giveOffset = $(line).data(side+'_off');
|
||||
|
||||
// TODO: Make this number (5) be based on marker width/height
|
||||
var size = line.getAttribute('stroke-width') * 5;
|
||||
return giveOffset ? size : 0;
|
||||
};
|
||||
|
||||
getBBintersect = function getBBintersect(x, y, bb, offset) {
|
||||
if (offset) {
|
||||
offset -= 0;
|
||||
bb = $.extend({}, bb);
|
||||
bb.width += offset;
|
||||
bb.height += offset;
|
||||
bb.x -= offset / 2;
|
||||
bb.y -= offset / 2;
|
||||
}
|
||||
|
||||
var midX = bb.x + bb.width / 2;
|
||||
var midY = bb.y + bb.height / 2;
|
||||
var lenX = x - midX;
|
||||
var lenY = y - midY;
|
||||
|
||||
var slope = Math.abs(lenY / lenX);
|
||||
|
||||
var ratio = void 0;
|
||||
if (slope < bb.height / bb.width) {
|
||||
ratio = bb.width / 2 / Math.abs(lenX);
|
||||
} else {
|
||||
ratio = lenY ? bb.height / 2 / Math.abs(lenY) : 0;
|
||||
}
|
||||
|
||||
return {
|
||||
x: midX + lenX * ratio,
|
||||
y: midY + lenY * ratio
|
||||
};
|
||||
};
|
||||
|
||||
$ = jQuery;
|
||||
svgEditor = this;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
getElem = svgCanvas.getElem;
|
||||
svgroot = S.svgroot, importLocale = S.importLocale, addElem = svgCanvas.addSVGElementFromJson, selManager = S.selectorManager, connSel = '.se_connector', elData = $.data;
|
||||
_context2.next = 15;
|
||||
return importLocale();
|
||||
|
||||
case 15:
|
||||
strings = _context2.sent;
|
||||
startX = void 0, startY = void 0, curLine = void 0, startElem = void 0, endElem = void 0, seNs = void 0, svgcontent = S.svgcontent, started = false, connections = [], selElems = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Element[]} [elem=selElems] Array of elements
|
||||
*/
|
||||
|
||||
// Do once
|
||||
(function () {
|
||||
var gse = svgCanvas.groupSelectedElements;
|
||||
|
||||
svgCanvas.groupSelectedElements = function () {
|
||||
svgCanvas.removeFromSelection($(connSel).toArray());
|
||||
return gse.apply(this, arguments);
|
||||
};
|
||||
|
||||
var mse = svgCanvas.moveSelectedElements;
|
||||
|
||||
svgCanvas.moveSelectedElements = function () {
|
||||
var cmd = mse.apply(this, arguments);
|
||||
updateConnectors();
|
||||
return cmd;
|
||||
};
|
||||
|
||||
seNs = svgCanvas.getEditorNS();
|
||||
})();
|
||||
|
||||
// Do on reset
|
||||
|
||||
|
||||
// $(svgroot).parent().mousemove(function (e) {
|
||||
// // if (started
|
||||
// // || svgCanvas.getMode() !== 'connector'
|
||||
// // || e.target.parentNode.parentNode !== svgcontent) return;
|
||||
//
|
||||
// console.log('y')
|
||||
// // if (e.target.parentNode.parentNode === svgcontent) {
|
||||
// //
|
||||
// // }
|
||||
// });
|
||||
|
||||
buttons = [{
|
||||
id: 'mode_connect',
|
||||
type: 'mode',
|
||||
icon: svgEditor.curConfig.imgPath + 'cut.png',
|
||||
includeWith: {
|
||||
button: '#tool_line',
|
||||
isDefault: false,
|
||||
position: 1
|
||||
},
|
||||
events: {
|
||||
click: function click() {
|
||||
svgCanvas.setMode('connector');
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context2.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.imgPath + 'conn.svg',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
addLangData: function () {
|
||||
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref2) {
|
||||
var lang = _ref2.lang,
|
||||
importLocale = _ref2.importLocale;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
return _context.abrupt('return', {
|
||||
data: strings.langList
|
||||
});
|
||||
|
||||
case 1:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function addLangData(_x3) {
|
||||
return _ref3.apply(this, arguments);
|
||||
}
|
||||
|
||||
return addLangData;
|
||||
}(),
|
||||
mouseDown: function mouseDown(opts) {
|
||||
var e = opts.event;
|
||||
startX = opts.start_x;
|
||||
startY = opts.start_y;
|
||||
var mode = svgCanvas.getMode();
|
||||
var initStroke = svgEditor.curConfig.initStroke;
|
||||
|
||||
|
||||
if (mode === 'connector') {
|
||||
if (started) {
|
||||
return;
|
||||
}
|
||||
|
||||
var mouseTarget = e.target;
|
||||
|
||||
var parents = $(mouseTarget).parents();
|
||||
|
||||
if ($.inArray(svgcontent, parents) !== -1) {
|
||||
// Connectable element
|
||||
|
||||
// If child of foreignObject, use parent
|
||||
var fo = $(mouseTarget).closest('foreignObject');
|
||||
startElem = fo.length ? fo[0] : mouseTarget;
|
||||
|
||||
// Get center of source element
|
||||
var bb = svgCanvas.getStrokedBBox([startElem]);
|
||||
var x = bb.x + bb.width / 2;
|
||||
var y = bb.y + bb.height / 2;
|
||||
|
||||
started = true;
|
||||
curLine = addElem({
|
||||
element: 'polyline',
|
||||
attr: {
|
||||
id: svgCanvas.getNextId(),
|
||||
points: x + ',' + y + ' ' + x + ',' + y + ' ' + startX + ',' + startY,
|
||||
stroke: '#' + initStroke.color,
|
||||
'stroke-width': !startElem.stroke_width || startElem.stroke_width === 0 ? initStroke.width : startElem.stroke_width,
|
||||
fill: 'none',
|
||||
opacity: initStroke.opacity,
|
||||
style: 'pointer-events:none'
|
||||
}
|
||||
});
|
||||
elData(curLine, 'start_bb', bb);
|
||||
}
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
if (mode === 'select') {
|
||||
findConnectors();
|
||||
}
|
||||
},
|
||||
mouseMove: function mouseMove(opts) {
|
||||
var zoom = svgCanvas.getZoom();
|
||||
// const e = opts.event;
|
||||
var x = opts.mouse_x / zoom;
|
||||
var y = opts.mouse_y / zoom;
|
||||
|
||||
var diffX = x - startX,
|
||||
diffY = y - startY;
|
||||
|
||||
var mode = svgCanvas.getMode();
|
||||
|
||||
if (mode === 'connector' && started) {
|
||||
// const sw = curLine.getAttribute('stroke-width') * 3;
|
||||
// Set start point (adjusts based on bb)
|
||||
var pt = getBBintersect(x, y, elData(curLine, 'start_bb'), getOffset('start', curLine));
|
||||
startX = pt.x;
|
||||
startY = pt.y;
|
||||
|
||||
setPoint(curLine, 0, pt.x, pt.y, true);
|
||||
|
||||
// Set end point
|
||||
setPoint(curLine, 'end', x, y, true);
|
||||
} else if (mode === 'select') {
|
||||
var slen = selElems.length;
|
||||
while (slen--) {
|
||||
var elem = selElems[slen];
|
||||
// Look for selected connector elements
|
||||
if (elem && elData(elem, 'c_start')) {
|
||||
// Remove the "translate" transform given to move
|
||||
svgCanvas.removeFromSelection([elem]);
|
||||
svgCanvas.getTransformList(elem).clear();
|
||||
}
|
||||
}
|
||||
if (connections.length) {
|
||||
updateLine(diffX, diffY);
|
||||
}
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp(opts) {
|
||||
// const zoom = svgCanvas.getZoom();
|
||||
var e = opts.event;
|
||||
// , x = opts.mouse_x / zoom,
|
||||
// , y = opts.mouse_y / zoom,
|
||||
var mouseTarget = e.target;
|
||||
|
||||
if (svgCanvas.getMode() !== 'connector') {
|
||||
return;
|
||||
}
|
||||
var fo = $(mouseTarget).closest('foreignObject');
|
||||
if (fo.length) {
|
||||
mouseTarget = fo[0];
|
||||
}
|
||||
|
||||
var parents = $(mouseTarget).parents();
|
||||
|
||||
if (mouseTarget === startElem) {
|
||||
// Start line through click
|
||||
started = true;
|
||||
return {
|
||||
keep: true,
|
||||
element: null,
|
||||
started: started
|
||||
};
|
||||
}
|
||||
if ($.inArray(svgcontent, parents) === -1) {
|
||||
// Not a valid target element, so remove line
|
||||
$(curLine).remove();
|
||||
started = false;
|
||||
return {
|
||||
keep: false,
|
||||
element: null,
|
||||
started: started
|
||||
};
|
||||
}
|
||||
// Valid end element
|
||||
endElem = mouseTarget;
|
||||
|
||||
var startId = startElem.id,
|
||||
endId = endElem.id;
|
||||
var connStr = startId + ' ' + endId;
|
||||
var altStr = endId + ' ' + startId;
|
||||
// Don't create connector if one already exists
|
||||
var dupe = $(svgcontent).find(connSel).filter(function () {
|
||||
var conn = this.getAttributeNS(seNs, 'connector');
|
||||
if (conn === connStr || conn === altStr) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (dupe.length) {
|
||||
$(curLine).remove();
|
||||
return {
|
||||
keep: false,
|
||||
element: null,
|
||||
started: false
|
||||
};
|
||||
}
|
||||
|
||||
var bb = svgCanvas.getStrokedBBox([endElem]);
|
||||
|
||||
var pt = getBBintersect(startX, startY, bb, getOffset('start', curLine));
|
||||
setPoint(curLine, 'end', pt.x, pt.y, true);
|
||||
$(curLine).data('c_start', startId).data('c_end', endId).data('end_bb', bb);
|
||||
seNs = svgCanvas.getEditorNS(true);
|
||||
curLine.setAttributeNS(seNs, 'se:connector', connStr);
|
||||
curLine.setAttribute('class', connSel.substr(1));
|
||||
curLine.setAttribute('opacity', 1);
|
||||
svgCanvas.addToSelection([curLine]);
|
||||
svgCanvas.moveToBottomSelectedElement();
|
||||
selManager.requestSelector(curLine).showGrips(false);
|
||||
started = false;
|
||||
return {
|
||||
keep: true,
|
||||
element: curLine,
|
||||
started: started
|
||||
};
|
||||
},
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// TODO: Find better way to skip operations if no connectors are in use
|
||||
if (!$(svgcontent).find(connSel).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (svgCanvas.getMode() === 'connector') {
|
||||
svgCanvas.setMode('select');
|
||||
}
|
||||
|
||||
// Use this to update the current selected elements
|
||||
selElems = opts.elems;
|
||||
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && elData(elem, 'c_start')) {
|
||||
selManager.requestSelector(elem).showGrips(false);
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
// TODO: Set up context tools and hide most regular line tools
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
updateConnectors();
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
var elem = opts.elems[0];
|
||||
if (elem && elem.tagName === 'svg' && elem.id === 'svgcontent') {
|
||||
// Update svgcontent (can change on import)
|
||||
svgcontent = elem;
|
||||
init();
|
||||
}
|
||||
|
||||
// Has marker, so change offset
|
||||
if (elem && (elem.getAttribute('marker-start') || elem.getAttribute('marker-mid') || elem.getAttribute('marker-end'))) {
|
||||
var start = elem.getAttribute('marker-start');
|
||||
var mid = elem.getAttribute('marker-mid');
|
||||
var end = elem.getAttribute('marker-end');
|
||||
curLine = elem;
|
||||
$(elem).data('start_off', !!start).data('end_off', !!end);
|
||||
|
||||
if (elem.tagName === 'line' && mid) {
|
||||
// Convert to polyline to accept mid-arrow
|
||||
|
||||
var x1 = Number(elem.getAttribute('x1'));
|
||||
var x2 = Number(elem.getAttribute('x2'));
|
||||
var y1 = Number(elem.getAttribute('y1'));
|
||||
var y2 = Number(elem.getAttribute('y2'));
|
||||
var _elem = elem,
|
||||
id = _elem.id;
|
||||
|
||||
|
||||
var midPt = ' ' + (x1 + x2) / 2 + ',' + (y1 + y2) / 2 + ' ';
|
||||
var pline = addElem({
|
||||
element: 'polyline',
|
||||
attr: {
|
||||
points: x1 + ',' + y1 + midPt + x2 + ',' + y2,
|
||||
stroke: elem.getAttribute('stroke'),
|
||||
'stroke-width': elem.getAttribute('stroke-width'),
|
||||
'marker-mid': mid,
|
||||
fill: 'none',
|
||||
opacity: elem.getAttribute('opacity') || 1
|
||||
}
|
||||
});
|
||||
$(elem).after(pline).remove();
|
||||
svgCanvas.clearSelection();
|
||||
pline.id = id;
|
||||
svgCanvas.addToSelection([pline]);
|
||||
elem = pline;
|
||||
}
|
||||
}
|
||||
// Update line if it's a connector
|
||||
if (elem.getAttribute('class') === connSel.substr(1)) {
|
||||
var _start = getElem(elData(elem, 'c_start'));
|
||||
updateConnectors([_start]);
|
||||
} else {
|
||||
updateConnectors();
|
||||
}
|
||||
},
|
||||
IDsUpdated: function IDsUpdated(input) {
|
||||
var remove = [];
|
||||
input.elems.forEach(function (elem) {
|
||||
if ('se:connector' in elem.attr) {
|
||||
elem.attr['se:connector'] = elem.attr['se:connector'].split(' ').map(function (oldID) {
|
||||
return input.changes[oldID];
|
||||
}).join(' ');
|
||||
|
||||
// Check validity - the field would be something like 'svg_21 svg_22', but
|
||||
// if one end is missing, it would be 'svg_21' and therefore fail this test
|
||||
if (!/. ./.test(elem.attr['se:connector'])) {
|
||||
remove.push(elem.attr.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
return { remove: remove };
|
||||
},
|
||||
toolButtonStateUpdate: function toolButtonStateUpdate(opts) {
|
||||
if (opts.nostroke) {
|
||||
if ($('#mode_connect').hasClass('tool_button_current')) {
|
||||
svgEditor.clickSelect();
|
||||
}
|
||||
}
|
||||
$('#mode_connect').toggleClass('disabled', opts.nostroke);
|
||||
}
|
||||
});
|
||||
|
||||
case 20:
|
||||
case 'end':
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extConnector;
|
||||
|
||||
}());
|
|
@ -0,0 +1,185 @@
|
|||
var svgEditorExtension_eyedropper = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-eyedropper.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Jeff Schiller
|
||||
*
|
||||
*/
|
||||
|
||||
var extEyedropper = {
|
||||
name: 'eyedropper',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(S) {
|
||||
var strings, svgEditor, $, ChangeElementCommand, svgCanvas, addToHistory, currentStyle, getStyle, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
getStyle = function getStyle(opts) {
|
||||
// if we are in eyedropper mode, we don't want to disable the eye-dropper tool
|
||||
var mode = svgCanvas.getMode();
|
||||
if (mode === 'eyedropper') {
|
||||
return;
|
||||
}
|
||||
|
||||
var tool = $('#tool_eyedropper');
|
||||
// enable-eye-dropper if one element is selected
|
||||
var elem = null;
|
||||
if (!opts.multiselected && opts.elems[0] && !['svg', 'g', 'use'].includes(opts.elems[0].nodeName)) {
|
||||
elem = opts.elems[0];
|
||||
tool.removeClass('disabled');
|
||||
// grab the current style
|
||||
currentStyle.fillPaint = elem.getAttribute('fill') || 'black';
|
||||
currentStyle.fillOpacity = elem.getAttribute('fill-opacity') || 1.0;
|
||||
currentStyle.strokePaint = elem.getAttribute('stroke');
|
||||
currentStyle.strokeOpacity = elem.getAttribute('stroke-opacity') || 1.0;
|
||||
currentStyle.strokeWidth = elem.getAttribute('stroke-width');
|
||||
currentStyle.strokeDashArray = elem.getAttribute('stroke-dasharray');
|
||||
currentStyle.strokeLinecap = elem.getAttribute('stroke-linecap');
|
||||
currentStyle.strokeLinejoin = elem.getAttribute('stroke-linejoin');
|
||||
currentStyle.opacity = elem.getAttribute('opacity') || 1.0;
|
||||
// disable eye-dropper tool
|
||||
} else {
|
||||
tool.addClass('disabled');
|
||||
}
|
||||
};
|
||||
|
||||
_context.next = 3;
|
||||
return S.importLocale();
|
||||
|
||||
case 3:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
ChangeElementCommand = S.ChangeElementCommand, svgCanvas = svgEditor.canvas, addToHistory = function addToHistory(cmd) {
|
||||
svgCanvas.undoMgr.addCommandToHistory(cmd);
|
||||
}, currentStyle = {
|
||||
fillPaint: 'red', fillOpacity: 1.0,
|
||||
strokePaint: 'black', strokeOpacity: 1.0,
|
||||
strokeWidth: 5, strokeDashArray: null,
|
||||
opacity: 1.0,
|
||||
strokeLinecap: 'butt',
|
||||
strokeLinejoin: 'miter'
|
||||
};
|
||||
buttons = [{
|
||||
id: 'tool_eyedropper',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'eyedropper.png',
|
||||
type: 'mode',
|
||||
events: {
|
||||
click: function click() {
|
||||
svgCanvas.setMode('eyedropper');
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'eyedropper-icon.xml',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
|
||||
// if we have selected an element, grab its paint and enable the eye dropper button
|
||||
selectedChanged: getStyle,
|
||||
elementChanged: getStyle,
|
||||
|
||||
mouseDown: function mouseDown(opts) {
|
||||
var mode = svgCanvas.getMode();
|
||||
if (mode === 'eyedropper') {
|
||||
var e = opts.event;
|
||||
var target = e.target;
|
||||
|
||||
if (!['svg', 'g', 'use'].includes(target.nodeName)) {
|
||||
var changes = {};
|
||||
|
||||
var change = function change(elem, attrname, newvalue) {
|
||||
changes[attrname] = elem.getAttribute(attrname);
|
||||
elem.setAttribute(attrname, newvalue);
|
||||
};
|
||||
|
||||
if (currentStyle.fillPaint) {
|
||||
change(target, 'fill', currentStyle.fillPaint);
|
||||
}
|
||||
if (currentStyle.fillOpacity) {
|
||||
change(target, 'fill-opacity', currentStyle.fillOpacity);
|
||||
}
|
||||
if (currentStyle.strokePaint) {
|
||||
change(target, 'stroke', currentStyle.strokePaint);
|
||||
}
|
||||
if (currentStyle.strokeOpacity) {
|
||||
change(target, 'stroke-opacity', currentStyle.strokeOpacity);
|
||||
}
|
||||
if (currentStyle.strokeWidth) {
|
||||
change(target, 'stroke-width', currentStyle.strokeWidth);
|
||||
}
|
||||
if (currentStyle.strokeDashArray) {
|
||||
change(target, 'stroke-dasharray', currentStyle.strokeDashArray);
|
||||
}
|
||||
if (currentStyle.opacity) {
|
||||
change(target, 'opacity', currentStyle.opacity);
|
||||
}
|
||||
if (currentStyle.strokeLinecap) {
|
||||
change(target, 'stroke-linecap', currentStyle.strokeLinecap);
|
||||
}
|
||||
if (currentStyle.strokeLinejoin) {
|
||||
change(target, 'stroke-linejoin', currentStyle.strokeLinejoin);
|
||||
}
|
||||
|
||||
addToHistory(new ChangeElementCommand(target, changes));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
case 9:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extEyedropper;
|
||||
|
||||
}());
|
|
@ -0,0 +1,318 @@
|
|||
var svgEditorExtension_foreignobject = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-foreignobject.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
* @copyright 2010 Jacques Distler, 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
var extForeignobject = {
|
||||
name: 'foreignobject',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(S) {
|
||||
var svgEditor, text2xml, NS, importLocale, $, svgCanvas, svgdoc, strings, properlySourceSizeTextArea, showPanel, toggleSourceButtons, selElems, started, newFO, editingforeign, setForeignString, showForeignEditor, setAttr, buttons, contextTools;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
setAttr = function setAttr(attr, val) {
|
||||
svgCanvas.changeSelectedAttribute(attr, val);
|
||||
svgCanvas.call('changed', selElems);
|
||||
};
|
||||
|
||||
showForeignEditor = function showForeignEditor() {
|
||||
var elt = selElems[0];
|
||||
if (!elt || editingforeign) {
|
||||
return;
|
||||
}
|
||||
editingforeign = true;
|
||||
toggleSourceButtons(true);
|
||||
elt.removeAttribute('fill');
|
||||
|
||||
var str = svgCanvas.svgToString(elt, 0);
|
||||
$('#svg_source_textarea').val(str);
|
||||
$('#svg_source_editor').fadeIn();
|
||||
properlySourceSizeTextArea();
|
||||
$('#svg_source_textarea').focus();
|
||||
};
|
||||
|
||||
setForeignString = function setForeignString(xmlString) {
|
||||
var elt = selElems[0];
|
||||
try {
|
||||
// convert string into XML document
|
||||
var newDoc = text2xml('<svg xmlns="' + NS.SVG + '" xmlns:xlink="' + NS.XLINK + '">' + xmlString + '</svg>');
|
||||
// run it through our sanitizer to remove anything we do not support
|
||||
svgCanvas.sanitizeSvg(newDoc.documentElement);
|
||||
elt.replaceWith(svgdoc.importNode(newDoc.documentElement.firstChild, true));
|
||||
svgCanvas.call('changed', [elt]);
|
||||
svgCanvas.clearSelection();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
toggleSourceButtons = function toggleSourceButtons(on) {
|
||||
$('#tool_source_save, #tool_source_cancel').toggle(!on);
|
||||
$('#foreign_save, #foreign_cancel').toggle(on);
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
var fcRules = $('#fc_rules');
|
||||
if (!fcRules.length) {
|
||||
fcRules = $('<style id="fc_rules"></style>').appendTo('head');
|
||||
}
|
||||
fcRules.text(!on ? '' : ' #tool_topath { display: none !important; }');
|
||||
$('#foreignObject_panel').toggle(on);
|
||||
};
|
||||
|
||||
svgEditor = this;
|
||||
text2xml = S.text2xml, NS = S.NS, importLocale = S.importLocale;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
svgdoc = S.svgroot.parentNode.ownerDocument;
|
||||
_context.next = 12;
|
||||
return importLocale();
|
||||
|
||||
case 12:
|
||||
strings = _context.sent;
|
||||
|
||||
properlySourceSizeTextArea = function properlySourceSizeTextArea() {
|
||||
// TODO: remove magic numbers here and get values from CSS
|
||||
var height = $('#svg_source_container').height() - 80;
|
||||
$('#svg_source_textarea').css('height', height);
|
||||
};
|
||||
|
||||
selElems = void 0, started = void 0, newFO = void 0, editingforeign = false;
|
||||
|
||||
/**
|
||||
* This function sets the content of element elt to the input XML.
|
||||
* @param {string} xmlString - The XML text
|
||||
* @param {Element} elt - the parent element to append to
|
||||
* @returns {boolean} This function returns false if the set was unsuccessful, true otherwise.
|
||||
*/
|
||||
|
||||
buttons = [{
|
||||
id: 'tool_foreign',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-tool.png',
|
||||
type: 'mode',
|
||||
events: {
|
||||
click: function click() {
|
||||
svgCanvas.setMode('foreign');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
id: 'edit_foreign',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-edit.png',
|
||||
type: 'context',
|
||||
panel: 'foreignObject_panel',
|
||||
events: {
|
||||
click: function click() {
|
||||
showForeignEditor();
|
||||
}
|
||||
}
|
||||
}];
|
||||
contextTools = [{
|
||||
type: 'input',
|
||||
panel: 'foreignObject_panel',
|
||||
id: 'foreign_width',
|
||||
size: 3,
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('width', this.value);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'foreignObject_panel',
|
||||
id: 'foreign_height',
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('height', this.value);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'foreignObject_panel',
|
||||
id: 'foreign_font_size',
|
||||
size: 2,
|
||||
defval: 16,
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('font-size', this.value);
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'foreignobject-icons.xml',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
context_tools: strings.contextTools.map(function (contextTool, i) {
|
||||
return Object.assign(contextTools[i], contextTool);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('#foreignObject_panel').hide();
|
||||
|
||||
var endChanges = function endChanges() {
|
||||
$('#svg_source_editor').hide();
|
||||
editingforeign = false;
|
||||
$('#svg_source_textarea').blur();
|
||||
toggleSourceButtons(false);
|
||||
};
|
||||
|
||||
// TODO: Needs to be done after orig icon loads
|
||||
setTimeout(function () {
|
||||
// Create source save/cancel buttons
|
||||
/* const save = */$('#tool_source_save').clone().hide().attr('id', 'foreign_save').unbind().appendTo('#tool_source_back').click(function () {
|
||||
if (!editingforeign) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!setForeignString($('#svg_source_textarea').val())) {
|
||||
$.confirm('Errors found. Revert to original?', function (ok) {
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
endChanges();
|
||||
});
|
||||
} else {
|
||||
endChanges();
|
||||
}
|
||||
// setSelectMode();
|
||||
});
|
||||
|
||||
/* const cancel = */$('#tool_source_cancel').clone().hide().attr('id', 'foreign_cancel').unbind().appendTo('#tool_source_back').click(function () {
|
||||
endChanges();
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
mouseDown: function mouseDown(opts) {
|
||||
// const e = opts.event;
|
||||
|
||||
if (svgCanvas.getMode() === 'foreign') {
|
||||
started = true;
|
||||
newFO = svgCanvas.addSVGElementFromJson({
|
||||
element: 'foreignObject',
|
||||
attr: {
|
||||
x: opts.start_x,
|
||||
y: opts.start_y,
|
||||
id: svgCanvas.getNextId(),
|
||||
'font-size': 16, // cur_text.font_size,
|
||||
width: '48',
|
||||
height: '20',
|
||||
style: 'pointer-events:inherit'
|
||||
}
|
||||
});
|
||||
var m = svgdoc.createElementNS(NS.MATH, 'math');
|
||||
m.setAttributeNS(NS.XMLNS, 'xmlns', NS.MATH);
|
||||
m.setAttribute('display', 'inline');
|
||||
var mi = svgdoc.createElementNS(NS.MATH, 'mi');
|
||||
mi.setAttribute('mathvariant', 'normal');
|
||||
mi.textContent = '\u03A6';
|
||||
var mo = svgdoc.createElementNS(NS.MATH, 'mo');
|
||||
mo.textContent = '\u222A';
|
||||
var mi2 = svgdoc.createElementNS(NS.MATH, 'mi');
|
||||
mi2.textContent = '\u2133';
|
||||
m.append(mi, mo, mi2);
|
||||
newFO.append(m);
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp(opts) {
|
||||
// const e = opts.event;
|
||||
if (svgCanvas.getMode() === 'foreign' && started) {
|
||||
var attrs = $(newFO).attr(['width', 'height']);
|
||||
var keep = attrs.width !== '0' || attrs.height !== '0';
|
||||
svgCanvas.addToSelection([newFO], true);
|
||||
|
||||
return {
|
||||
keep: keep,
|
||||
element: newFO
|
||||
};
|
||||
}
|
||||
},
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// Use this to update the current selected elements
|
||||
selElems = opts.elems;
|
||||
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && elem.tagName === 'foreignObject') {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
$('#foreign_font_size').val(elem.getAttribute('font-size'));
|
||||
$('#foreign_width').val(elem.getAttribute('width'));
|
||||
$('#foreign_height').val(elem.getAttribute('height'));
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
// const elem = opts.elems[0];
|
||||
}
|
||||
});
|
||||
|
||||
case 18:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extForeignobject;
|
||||
|
||||
}());
|
|
@ -0,0 +1,230 @@
|
|||
var svgEditorExtension_grid = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-grid.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
* @copyright 2010 Redou Mine, 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
var extGrid = {
|
||||
name: 'grid',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var NS = _ref.NS,
|
||||
getTypeMap = _ref.getTypeMap,
|
||||
importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, $, svgCanvas, svgdoc, assignAttributes, hcanvas, canvBG, units, intervals, showGrid, canvasGrid, gridPattern, gridimg, gridBox, updateGrid, gridUpdate, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
gridUpdate = function gridUpdate() {
|
||||
if (showGrid) {
|
||||
updateGrid(svgCanvas.getZoom());
|
||||
}
|
||||
$('#canvasGrid').toggle(showGrid);
|
||||
$('#view_grid').toggleClass('push_button_pressed tool_button');
|
||||
};
|
||||
|
||||
updateGrid = function updateGrid(zoom) {
|
||||
// TODO: Try this with <line> elements, then compare performance difference
|
||||
var unit = units[svgEditor.curConfig.baseUnit]; // 1 = 1px
|
||||
var uMulti = unit * zoom;
|
||||
// Calculate the main number interval
|
||||
var rawM = 100 / uMulti;
|
||||
var multi = 1;
|
||||
for (var i = 0; i < intervals.length; i++) {
|
||||
var num = intervals[i];
|
||||
multi = num;
|
||||
if (rawM <= num) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
var bigInt = multi * uMulti;
|
||||
|
||||
// Set the canvas size to the width of the container
|
||||
hcanvas.width = bigInt;
|
||||
hcanvas.height = bigInt;
|
||||
var ctx = hcanvas.getContext('2d');
|
||||
var curD = 0.5;
|
||||
var part = bigInt / 10;
|
||||
|
||||
ctx.globalAlpha = 0.2;
|
||||
ctx.strokeStyle = svgEditor.curConfig.gridColor;
|
||||
for (var _i = 1; _i < 10; _i++) {
|
||||
var subD = Math.round(part * _i) + 0.5;
|
||||
// const lineNum = (i % 2)?12:10;
|
||||
var lineNum = 0;
|
||||
ctx.moveTo(subD, bigInt);
|
||||
ctx.lineTo(subD, lineNum);
|
||||
ctx.moveTo(bigInt, subD);
|
||||
ctx.lineTo(lineNum, subD);
|
||||
}
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.globalAlpha = 0.5;
|
||||
ctx.moveTo(curD, bigInt);
|
||||
ctx.lineTo(curD, 0);
|
||||
|
||||
ctx.moveTo(bigInt, curD);
|
||||
ctx.lineTo(0, curD);
|
||||
ctx.stroke();
|
||||
|
||||
var datauri = hcanvas.toDataURL('image/png');
|
||||
gridimg.setAttribute('width', bigInt);
|
||||
gridimg.setAttribute('height', bigInt);
|
||||
gridimg.parentNode.setAttribute('width', bigInt);
|
||||
gridimg.parentNode.setAttribute('height', bigInt);
|
||||
svgCanvas.setHref(gridimg, datauri);
|
||||
};
|
||||
|
||||
_context.next = 4;
|
||||
return importLocale();
|
||||
|
||||
case 4:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
svgdoc = document.getElementById('svgcanvas').ownerDocument, assignAttributes = svgCanvas.assignAttributes, hcanvas = document.createElement('canvas'), canvBG = $('#canvasBackground'), units = getTypeMap(), intervals = [0.01, 0.1, 1, 10, 100, 1000];
|
||||
showGrid = svgEditor.curConfig.showGrid || false;
|
||||
|
||||
|
||||
$(hcanvas).hide().appendTo('body');
|
||||
|
||||
canvasGrid = svgdoc.createElementNS(NS.SVG, 'svg');
|
||||
|
||||
assignAttributes(canvasGrid, {
|
||||
id: 'canvasGrid',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
x: 0,
|
||||
y: 0,
|
||||
overflow: 'visible',
|
||||
display: 'none'
|
||||
});
|
||||
canvBG.append(canvasGrid);
|
||||
|
||||
// grid-pattern
|
||||
gridPattern = svgdoc.createElementNS(NS.SVG, 'pattern');
|
||||
|
||||
assignAttributes(gridPattern, {
|
||||
id: 'gridpattern',
|
||||
patternUnits: 'userSpaceOnUse',
|
||||
x: 0, // -(value.strokeWidth / 2), // position for strokewidth
|
||||
y: 0, // -(value.strokeWidth / 2), // position for strokewidth
|
||||
width: 100,
|
||||
height: 100
|
||||
});
|
||||
|
||||
gridimg = svgdoc.createElementNS(NS.SVG, 'image');
|
||||
|
||||
assignAttributes(gridimg, {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 100,
|
||||
height: 100
|
||||
});
|
||||
gridPattern.append(gridimg);
|
||||
$('#svgroot defs').append(gridPattern);
|
||||
|
||||
// grid-box
|
||||
gridBox = svgdoc.createElementNS(NS.SVG, 'rect');
|
||||
|
||||
assignAttributes(gridBox, {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
x: 0,
|
||||
y: 0,
|
||||
'stroke-width': 0,
|
||||
stroke: 'none',
|
||||
fill: 'url(#gridpattern)',
|
||||
style: 'pointer-events: none; display:visible;'
|
||||
});
|
||||
$('#canvasGrid').append(gridBox);
|
||||
|
||||
buttons = [{
|
||||
id: 'view_grid',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'grid.png',
|
||||
type: 'context',
|
||||
panel: 'editor_panel',
|
||||
events: {
|
||||
click: function click() {
|
||||
svgEditor.curConfig.showGrid = showGrid = !showGrid;
|
||||
gridUpdate();
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'grid-icon.xml',
|
||||
|
||||
zoomChanged: function zoomChanged(zoom) {
|
||||
if (showGrid) {
|
||||
updateGrid(zoom);
|
||||
}
|
||||
},
|
||||
callback: function callback() {
|
||||
if (showGrid) {
|
||||
gridUpdate();
|
||||
}
|
||||
},
|
||||
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
})
|
||||
});
|
||||
|
||||
case 25:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extGrid;
|
||||
|
||||
}());
|
|
@ -0,0 +1,193 @@
|
|||
var svgEditorExtension_helloworld = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var slicedToArray = function () {
|
||||
function sliceIterator(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"]) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
return function (arr, i) {
|
||||
if (Array.isArray(arr)) {
|
||||
return arr;
|
||||
} else if (Symbol.iterator in Object(arr)) {
|
||||
return sliceIterator(arr, i);
|
||||
} else {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-helloworld.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a very basic SVG-Edit extension. It adds a "Hello World" button in
|
||||
* the left ("mode") panel. Clicking on the button, and then the canvas
|
||||
* will show the user the point on the canvas that was clicked on.
|
||||
*/
|
||||
var extHelloworld = {
|
||||
name: 'helloworld',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, $, svgCanvas;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return importLocale();
|
||||
|
||||
case 2:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
// For more notes on how to make an icon file, see the source of
|
||||
// the helloworld-icon.xml
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'helloworld-icon.xml',
|
||||
|
||||
// Multiple buttons can be added in this array
|
||||
buttons: [{
|
||||
// Must match the icon ID in helloworld-icon.xml
|
||||
id: 'hello_world',
|
||||
|
||||
// Fallback, e.g., for `file://` access
|
||||
icon: svgEditor.curConfig.extIconsPath + 'helloworld.png',
|
||||
|
||||
// This indicates that the button will be added to the "mode"
|
||||
// button panel on the left side
|
||||
type: 'mode',
|
||||
|
||||
// Tooltip text
|
||||
title: strings.buttons[0].title,
|
||||
|
||||
// Events
|
||||
events: {
|
||||
click: function click() {
|
||||
// The action taken when the button is clicked on.
|
||||
// For "mode" buttons, any other button will
|
||||
// automatically be de-pressed.
|
||||
svgCanvas.setMode('hello_world');
|
||||
}
|
||||
}
|
||||
}],
|
||||
// This is triggered when the main mouse button is pressed down
|
||||
// on the editor canvas (not the tool panels)
|
||||
mouseDown: function mouseDown() {
|
||||
// Check the mode on mousedown
|
||||
if (svgCanvas.getMode() === 'hello_world') {
|
||||
// The returned object must include "started" with
|
||||
// a value of true in order for mouseUp to be triggered
|
||||
return { started: true };
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// This is triggered from anywhere, but "started" must have been set
|
||||
// to true (see above). Note that "opts" is an object with event info
|
||||
mouseUp: function mouseUp(opts) {
|
||||
// Check the mode on mouseup
|
||||
if (svgCanvas.getMode() === 'hello_world') {
|
||||
var zoom = svgCanvas.getZoom();
|
||||
|
||||
// Get the actual coordinate by dividing by the zoom value
|
||||
var x = opts.mouse_x / zoom;
|
||||
var y = opts.mouse_y / zoom;
|
||||
|
||||
// We do our own formatting
|
||||
var text = strings.text;
|
||||
|
||||
[['x', x], ['y', y]].forEach(function (_ref3) {
|
||||
var _ref4 = slicedToArray(_ref3, 2),
|
||||
prop = _ref4[0],
|
||||
val = _ref4[1];
|
||||
|
||||
text = text.replace('{' + prop + '}', val);
|
||||
});
|
||||
|
||||
// Show the text using the custom alert function
|
||||
$.alert(text);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
case 7:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extHelloworld;
|
||||
|
||||
}());
|
|
@ -0,0 +1,429 @@
|
|||
var svgEditorExtension_imagelib = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-imagelib.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
var extImagelib = {
|
||||
name: 'imagelib',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var decode64 = _ref.decode64,
|
||||
importLocale = _ref.importLocale;
|
||||
var imagelibStrings, svgEditor, $, uiStrings, svgCanvas, closeBrowser, importImage, pending, mode, multiArr, transferStopped, preview, submit, toggleMulti, showBrowser, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
showBrowser = function showBrowser() {
|
||||
var browser = $('#imgbrowse');
|
||||
if (!browser.length) {
|
||||
$('<div id=imgbrowse_holder><div id=imgbrowse class=toolbar_button>' + '</div></div>').insertAfter('#svg_docprops');
|
||||
browser = $('#imgbrowse');
|
||||
|
||||
var allLibs = imagelibStrings.select_lib;
|
||||
|
||||
var libOpts = $('<ul id=imglib_opts>').appendTo(browser);
|
||||
var frame = $('<iframe/>').prependTo(browser).hide().wrap('<div id=lib_framewrap>');
|
||||
|
||||
var header = $('<h1>').prependTo(browser).text(allLibs).css({
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%'
|
||||
});
|
||||
|
||||
var cancel = $('<button>' + uiStrings.common.cancel + '</button>').appendTo(browser).on('click touchend', function () {
|
||||
$('#imgbrowse_holder').hide();
|
||||
}).css({
|
||||
position: 'absolute',
|
||||
top: 5,
|
||||
right: -10
|
||||
});
|
||||
|
||||
var leftBlock = $('<span>').css({ position: 'absolute', top: 5, left: 10 }).appendTo(browser);
|
||||
|
||||
var back = $('<button hidden>' + imagelibStrings.show_list + '</button>').appendTo(leftBlock).on('click touchend', function () {
|
||||
frame.attr('src', 'about:blank').hide();
|
||||
libOpts.show();
|
||||
header.text(allLibs);
|
||||
back.hide();
|
||||
}).css({
|
||||
'margin-right': 5
|
||||
}).hide();
|
||||
|
||||
/* const type = */$('<select><option value=s>' + imagelibStrings.import_single + '</option><option value=m>' + imagelibStrings.import_multi + '</option><option value=o>' + imagelibStrings.open + '</option></select>').appendTo(leftBlock).change(function () {
|
||||
mode = $(this).val();
|
||||
switch (mode) {
|
||||
case 's':
|
||||
case 'o':
|
||||
toggleMulti(false);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
// Import multiple
|
||||
toggleMulti(true);
|
||||
break;
|
||||
}
|
||||
}).css({
|
||||
'margin-top': 10
|
||||
});
|
||||
|
||||
cancel.prepend($.getSvgIcon('cancel', true));
|
||||
back.prepend($.getSvgIcon('tool_imagelib', true));
|
||||
|
||||
var modularVersion = !('svgEditor' in window) || !window.svgEditor || window.svgEditor.modules !== false;
|
||||
$.each(imagelibStrings.imgLibs, function (i, _ref3) {
|
||||
var name = _ref3.name,
|
||||
url = _ref3.url,
|
||||
description = _ref3.description;
|
||||
|
||||
$('<li>').appendTo(libOpts).text(name).on('click touchend', function () {
|
||||
frame.attr('src',
|
||||
// Todo: Adopt some standard formatting library like `fluent.js` instead
|
||||
url.replace('{path}', svgEditor.curConfig.extIconsPath).replace('{modularVersion}', modularVersion ? imagelibStrings.moduleEnding || '-es' : '')).show();
|
||||
header.text(name);
|
||||
libOpts.hide();
|
||||
back.show();
|
||||
}).append('<span>' + description + '</span>');
|
||||
});
|
||||
} else {
|
||||
$('#imgbrowse_holder').show();
|
||||
}
|
||||
};
|
||||
|
||||
toggleMulti = function toggleMulti(show) {
|
||||
$('#lib_framewrap, #imglib_opts').css({ right: show ? 200 : 10 });
|
||||
if (!preview) {
|
||||
preview = $('<div id=imglib_preview>').css({
|
||||
position: 'absolute',
|
||||
top: 45,
|
||||
right: 10,
|
||||
width: 180,
|
||||
bottom: 45,
|
||||
background: '#fff',
|
||||
overflow: 'auto'
|
||||
}).insertAfter('#lib_framewrap');
|
||||
|
||||
submit = $('<button disabled>Import selected</button>').appendTo('#imgbrowse').on('click touchend', function () {
|
||||
$.each(multiArr, function (i) {
|
||||
var type = this[0];
|
||||
var data = this[1];
|
||||
if (type === 'svg') {
|
||||
svgCanvas.importSvgString(data);
|
||||
} else {
|
||||
importImage(data);
|
||||
}
|
||||
svgCanvas.moveSelectedElements(i * 20, i * 20, false);
|
||||
});
|
||||
preview.empty();
|
||||
multiArr = [];
|
||||
$('#imgbrowse_holder').hide();
|
||||
}).css({
|
||||
position: 'absolute',
|
||||
bottom: 10,
|
||||
right: -10
|
||||
});
|
||||
}
|
||||
|
||||
preview.toggle(show);
|
||||
submit.toggle(show);
|
||||
};
|
||||
|
||||
importImage = function importImage(url) {
|
||||
var newImage = svgCanvas.addSVGElementFromJson({
|
||||
element: 'image',
|
||||
attr: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
id: svgCanvas.getNextId(),
|
||||
style: 'pointer-events:inherit'
|
||||
}
|
||||
});
|
||||
svgCanvas.clearSelection();
|
||||
svgCanvas.addToSelection([newImage]);
|
||||
svgCanvas.setImageURL(url);
|
||||
};
|
||||
|
||||
closeBrowser = function closeBrowser() {
|
||||
$('#imgbrowse_holder').hide();
|
||||
};
|
||||
|
||||
_context.next = 6;
|
||||
return importLocale();
|
||||
|
||||
case 6:
|
||||
imagelibStrings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
uiStrings = svgEditor.uiStrings, svgCanvas = svgEditor.canvas;
|
||||
pending = {};
|
||||
mode = 's';
|
||||
multiArr = [];
|
||||
transferStopped = false;
|
||||
preview = void 0, submit = void 0;
|
||||
|
||||
|
||||
window.addEventListener('message', function (evt) {
|
||||
// Receive `postMessage` data
|
||||
var response = evt.data;
|
||||
|
||||
if (!response || typeof response !== 'string') {
|
||||
// Do nothing
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// Todo: This block can be removed (and the above check changed to
|
||||
// insist on an object) if embedAPI moves away from a string to
|
||||
// an object (if IE9 support not needed)
|
||||
response = JSON.parse(response);
|
||||
if (response.namespace !== 'imagelib') {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hasName = 'name' in response;
|
||||
var hasHref = 'href' in response;
|
||||
|
||||
if (!hasName && transferStopped) {
|
||||
transferStopped = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var id = void 0;
|
||||
if (hasHref) {
|
||||
id = response.href;
|
||||
response = response.data;
|
||||
}
|
||||
|
||||
// Hide possible transfer dialog box
|
||||
$('#dialog_box').hide();
|
||||
var entry = void 0,
|
||||
curMeta = void 0,
|
||||
svgStr = void 0,
|
||||
imgStr = void 0;
|
||||
var type = hasName ? 'meta' : response.charAt(0);
|
||||
switch (type) {
|
||||
case 'meta':
|
||||
{
|
||||
// Metadata
|
||||
transferStopped = false;
|
||||
curMeta = response;
|
||||
|
||||
pending[curMeta.id] = curMeta;
|
||||
|
||||
var name = curMeta.name || 'file';
|
||||
|
||||
var message = uiStrings.notification.retrieving.replace('%s', name);
|
||||
|
||||
if (mode !== 'm') {
|
||||
$.process_cancel(message, function () {
|
||||
transferStopped = true;
|
||||
// Should a message be sent back to the frame?
|
||||
|
||||
$('#dialog_box').hide();
|
||||
});
|
||||
} else {
|
||||
entry = $('<div>' + message + '</div>').data('id', curMeta.id);
|
||||
preview.append(entry);
|
||||
curMeta.entry = entry;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
case '<':
|
||||
svgStr = true;
|
||||
break;
|
||||
case 'd':
|
||||
{
|
||||
if (response.startsWith('data:image/svg+xml')) {
|
||||
var pre = 'data:image/svg+xml;base64,';
|
||||
var src = response.substring(pre.length);
|
||||
response = decode64(src);
|
||||
svgStr = true;
|
||||
break;
|
||||
} else if (response.startsWith('data:image/')) {
|
||||
imgStr = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Else fall through
|
||||
default:
|
||||
// TODO: See if there's a way to base64 encode the binary data stream
|
||||
// const str = 'data:;base64,' + svgedit.utilities.encode64(response, true);
|
||||
|
||||
// Assume it's raw image data
|
||||
// importImage(str);
|
||||
|
||||
// Don't give warning as postMessage may have been used by something else
|
||||
if (mode !== 'm') {
|
||||
closeBrowser();
|
||||
} else {
|
||||
pending[id].entry.remove();
|
||||
}
|
||||
// $.alert('Unexpected data was returned: ' + response, function() {
|
||||
// if (mode !== 'm') {
|
||||
// closeBrowser();
|
||||
// } else {
|
||||
// pending[id].entry.remove();
|
||||
// }
|
||||
// });
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case 's':
|
||||
// Import one
|
||||
if (svgStr) {
|
||||
svgCanvas.importSvgString(response);
|
||||
} else if (imgStr) {
|
||||
importImage(response);
|
||||
}
|
||||
closeBrowser();
|
||||
break;
|
||||
case 'm':
|
||||
// Import multiple
|
||||
multiArr.push([svgStr ? 'svg' : 'img', response]);
|
||||
curMeta = pending[id];
|
||||
var title = void 0;
|
||||
if (svgStr) {
|
||||
if (curMeta && curMeta.name) {
|
||||
title = curMeta.name;
|
||||
} else {
|
||||
// Try to find a title
|
||||
var xml = new DOMParser().parseFromString(response, 'text/xml').documentElement;
|
||||
title = $(xml).children('title').first().text() || '(SVG #' + response.length + ')';
|
||||
}
|
||||
if (curMeta) {
|
||||
preview.children().each(function () {
|
||||
if ($(this).data('id') === id) {
|
||||
if (curMeta.preview_url) {
|
||||
$(this).html('<img src="' + curMeta.preview_url + '">' + title);
|
||||
} else {
|
||||
$(this).text(title);
|
||||
}
|
||||
submit.removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
preview.append('<div>' + title + '</div>');
|
||||
submit.removeAttr('disabled');
|
||||
}
|
||||
} else {
|
||||
if (curMeta && curMeta.preview_url) {
|
||||
title = curMeta.name || '';
|
||||
}
|
||||
if (curMeta && curMeta.preview_url) {
|
||||
entry = '<img src="' + curMeta.preview_url + '">' + title;
|
||||
} else {
|
||||
entry = '<img src="' + response + '">';
|
||||
}
|
||||
|
||||
if (curMeta) {
|
||||
preview.children().each(function () {
|
||||
if ($(this).data('id') === id) {
|
||||
$(this).html(entry);
|
||||
submit.removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
preview.append($('<div>').append(entry));
|
||||
submit.removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
// Open
|
||||
if (!svgStr) {
|
||||
break;
|
||||
}
|
||||
svgEditor.openPrep(function (ok) {
|
||||
if (!ok) {
|
||||
return;
|
||||
}
|
||||
svgCanvas.clear();
|
||||
svgCanvas.setSvgString(response);
|
||||
// updateCanvas();
|
||||
});
|
||||
closeBrowser();
|
||||
break;
|
||||
}
|
||||
}, true);
|
||||
|
||||
buttons = [{
|
||||
id: 'tool_imagelib',
|
||||
type: 'app_menu', // _flyout
|
||||
icon: svgEditor.curConfig.extIconsPath + 'imagelib.png',
|
||||
position: 4,
|
||||
events: {
|
||||
mouseup: showBrowser
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'ext-imagelib.xml',
|
||||
buttons: imagelibStrings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('<style>').text('#imgbrowse_holder {' + 'position: absolute;' + 'top: 0;' + 'left: 0;' + 'width: 100%;' + 'height: 100%;' + 'background-color: rgba(0, 0, 0, .5);' + 'z-index: 5;' + '}' + '#imgbrowse {' + 'position: absolute;' + 'top: 25px;' + 'left: 25px;' + 'right: 25px;' + 'bottom: 25px;' + 'min-width: 300px;' + 'min-height: 200px;' + 'background: #B0B0B0;' + 'border: 1px outset #777;' + '}' + '#imgbrowse h1 {' + 'font-size: 20px;' + 'margin: .4em;' + 'text-align: center;' + '}' + '#lib_framewrap,' + '#imgbrowse > ul {' + 'position: absolute;' + 'top: 45px;' + 'left: 10px;' + 'right: 10px;' + 'bottom: 10px;' + 'background: white;' + 'margin: 0;' + 'padding: 0;' + '}' + '#imgbrowse > ul {' + 'overflow: auto;' + '}' + '#imgbrowse > div {' + 'border: 1px solid #666;' + '}' + '#imglib_preview > div {' + 'padding: 5px;' + 'font-size: 12px;' + '}' + '#imglib_preview img {' + 'display: block;' + 'margin: 0 auto;' + 'max-height: 100px;' + '}' + '#imgbrowse li {' + 'list-style: none;' + 'padding: .5em;' + 'background: #E8E8E8;' + 'border-bottom: 1px solid #B0B0B0;' + 'line-height: 1.2em;' + 'font-style: sans-serif;' + '}' + '#imgbrowse li > span {' + 'color: #666;' + 'font-size: 15px;' + 'display: block;' + '}' + '#imgbrowse li:hover {' + 'background: #FFC;' + 'cursor: pointer;' + '}' + '#imgbrowse iframe {' + 'width: 100%;' + 'height: 100%;' + 'border: 0;' + '}').appendTo('head');
|
||||
}
|
||||
});
|
||||
|
||||
case 18:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extImagelib;
|
||||
|
||||
}());
|
|
@ -0,0 +1,22 @@
|
|||
var svgEditorExtensionLocale_arrows_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'Arrows',
|
||||
langList: [{ id: 'arrow_none', textContent: 'No arrow' }],
|
||||
contextTools: [{
|
||||
title: 'Select arrow type',
|
||||
options: {
|
||||
none: 'No arrow',
|
||||
end: '---->',
|
||||
start: '<----',
|
||||
both: '<--->',
|
||||
mid: '-->--',
|
||||
mid_bk: '--<--'
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,22 @@
|
|||
var svgEditorExtensionLocale_arrows_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var fr = {
|
||||
name: 'Arrows',
|
||||
langList: [{ id: 'arrow_none', textContent: 'Sans flèche' }],
|
||||
contextTools: [{
|
||||
title: 'Select arrow type',
|
||||
options: {
|
||||
none: 'No arrow',
|
||||
end: '---->',
|
||||
start: '<----',
|
||||
both: '<--->',
|
||||
mid: '-->--',
|
||||
mid_bk: '--<--'
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
return fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,15 @@
|
|||
var svgEditorExtensionLocale_closepath_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'ClosePath',
|
||||
buttons: [{
|
||||
title: 'Open path'
|
||||
}, {
|
||||
title: 'Close path'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,14 @@
|
|||
var svgEditorExtensionLocale_connector_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'Connector',
|
||||
langList: [{ id: 'mode_connect', title: 'Connect two objects' }],
|
||||
buttons: [{
|
||||
title: 'Connect two objects'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,14 @@
|
|||
var svgEditorExtensionLocale_connector_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var fr = {
|
||||
name: 'Connector',
|
||||
langList: [{ id: 'mode_connect', title: 'Connecter deux objets' }],
|
||||
buttons: [{
|
||||
title: 'Connect two objects'
|
||||
}]
|
||||
};
|
||||
|
||||
return fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,14 @@
|
|||
var svgEditorExtensionLocale_eyedropper_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'eyedropper',
|
||||
buttons: [{
|
||||
title: 'Eye Dropper Tool',
|
||||
key: 'I'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,25 @@
|
|||
var svgEditorExtensionLocale_foreignobject_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'foreignObject',
|
||||
buttons: [{
|
||||
title: 'Foreign Object Tool'
|
||||
}, {
|
||||
title: 'Edit ForeignObject Content'
|
||||
}],
|
||||
contextTools: [{
|
||||
title: "Change foreignObject's width",
|
||||
label: 'w'
|
||||
}, {
|
||||
title: "Change foreignObject's height",
|
||||
label: 'h'
|
||||
}, {
|
||||
title: "Change foreignObject's font size",
|
||||
label: 'font-size'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,13 @@
|
|||
var svgEditorExtensionLocale_grid_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'View Grid',
|
||||
buttons: [{
|
||||
title: 'Show/Hide Grid'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,14 @@
|
|||
var svgEditorExtensionLocale_helloworld_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'Hello World',
|
||||
text: 'Hello World!\n\nYou clicked here: {x}, {y}',
|
||||
buttons: [{
|
||||
title: "Say 'Hello World'"
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_de = (function () {
|
||||
'use strict';
|
||||
|
||||
var de = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Bilder-Bibliothek'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return de;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Image library'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var fr = {
|
||||
select_lib: "Choisir une bibliothèque d'images",
|
||||
show_list: 'show_list',
|
||||
import_single: 'import_single',
|
||||
import_multi: 'import_multi',
|
||||
open: 'open',
|
||||
buttons: [{
|
||||
title: "Bibliothèque d'images"
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_pl = (function () {
|
||||
'use strict';
|
||||
|
||||
var pl = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Biblioteka obrazów'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return pl;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_pt_BR = (function () {
|
||||
'use strict';
|
||||
|
||||
var ptBR = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Biblioteca de Imagens'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return ptBR;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_ro = (function () {
|
||||
'use strict';
|
||||
|
||||
var ro = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Bibliotecă de Imagini'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return ro;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_sk = (function () {
|
||||
'use strict';
|
||||
|
||||
var sk = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Knižnica obrázkov'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return sk;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_sl = (function () {
|
||||
'use strict';
|
||||
|
||||
var sl = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: 'Knjižnica slik'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return sl;
|
||||
|
||||
}());
|
|
@ -0,0 +1,30 @@
|
|||
var svgEditorExtensionLocale_imagelib_zh_CN = (function () {
|
||||
'use strict';
|
||||
|
||||
var zhCN = {
|
||||
select_lib: 'Select an image library',
|
||||
show_list: 'Show library list',
|
||||
import_single: 'Import single',
|
||||
import_multi: 'Import multiple',
|
||||
open: 'Open as new document',
|
||||
buttons: [{
|
||||
title: '图像库'
|
||||
}],
|
||||
imgLibs: [{
|
||||
name: 'Demo library (local)',
|
||||
url: '{path}imagelib/index{modularVersion}.html',
|
||||
description: 'Demonstration library for SVG-edit on this server'
|
||||
}, {
|
||||
name: 'IAN Symbol Libraries',
|
||||
url: 'https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php',
|
||||
description: 'Free library of illustrations'
|
||||
}, {
|
||||
name: 'Openclipart',
|
||||
url: 'https://openclipart.org/svgedit',
|
||||
description: 'Share and Use Images. Over 50,000 Public Domain SVG Images and Growing.'
|
||||
}]
|
||||
};
|
||||
|
||||
return zhCN;
|
||||
|
||||
}());
|
|
@ -0,0 +1,27 @@
|
|||
var svgEditorExtensionLocale_markers_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'Markers',
|
||||
langList: [{ id: 'nomarker', title: 'No Marker' }, { id: 'leftarrow', title: 'Left Arrow' }, { id: 'rightarrow', title: 'Right Arrow' }, { id: 'textmarker', title: 'Text Marker' }, { id: 'forwardslash', title: 'Forward Slash' }, { id: 'reverseslash', title: 'Reverse Slash' }, { id: 'verticalslash', title: 'Vertical Slash' }, { id: 'box', title: 'Box' }, { id: 'star', title: 'Star' }, { id: 'xmark', title: 'X' }, { id: 'triangle', title: 'Triangle' }, { id: 'mcircle', title: 'Circle' }, { id: 'leftarrow_o', title: 'Open Left Arrow' }, { id: 'rightarrow_o', title: 'Open Right Arrow' }, { id: 'box_o', title: 'Open Box' }, { id: 'star_o', title: 'Open Star' }, { id: 'triangle_o', title: 'Open Triangle' }, { id: 'mcircle_o', title: 'Open Circle' }],
|
||||
contextTools: [{
|
||||
title: 'Start marker',
|
||||
label: 's'
|
||||
}, {
|
||||
title: 'Select start marker type'
|
||||
}, {
|
||||
title: 'Middle marker',
|
||||
label: 'm'
|
||||
}, {
|
||||
title: 'Select mid marker type'
|
||||
}, {
|
||||
title: 'End marker',
|
||||
label: 'e'
|
||||
}, {
|
||||
title: 'Select end marker type'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,13 @@
|
|||
var svgEditorExtensionLocale_mathjax_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'MathJax',
|
||||
buttons: [{
|
||||
title: 'Add Mathematics'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,13 @@
|
|||
var svgEditorExtensionLocale_panning_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'Extension Panning',
|
||||
buttons: [{
|
||||
title: 'Panning'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,17 @@
|
|||
var svgEditorExtensionLocale_polygon_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'polygon',
|
||||
buttons: [{
|
||||
title: 'Polygon Tool'
|
||||
}],
|
||||
contextTools: [{
|
||||
title: 'Number of Sides',
|
||||
label: 'sides'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,10 @@
|
|||
var svgEditorExtensionLocale_server_moinsave_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
saved: 'Saved! Return to Item View!'
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,10 @@
|
|||
var svgEditorExtensionLocale_server_opensave_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
uploading: 'Uploading...'
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,29 @@
|
|||
var svgEditorExtensionLocale_shapes_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
loading: 'Loading...',
|
||||
categories: {
|
||||
basic: 'Basic',
|
||||
object: 'Objects',
|
||||
symbol: 'Symbols',
|
||||
arrow: 'Arrows',
|
||||
flowchart: 'Flowchart',
|
||||
animal: 'Animals',
|
||||
game: 'Cards & Chess',
|
||||
dialog_balloon: 'Dialog balloons',
|
||||
electronics: 'Electronics',
|
||||
math: 'Mathematical',
|
||||
music: 'Music',
|
||||
misc: 'Miscellaneous',
|
||||
raphael_1: 'raphaeljs.com set 1',
|
||||
raphael_2: 'raphaeljs.com set 2'
|
||||
},
|
||||
buttons: [{
|
||||
title: 'Shape library'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,29 @@
|
|||
var svgEditorExtensionLocale_shapes_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var fr = {
|
||||
loading: 'Loading...',
|
||||
categories: {
|
||||
basic: 'Basic',
|
||||
object: 'Objects',
|
||||
symbol: 'Symbols',
|
||||
arrow: 'Arrows',
|
||||
flowchart: 'Flowchart',
|
||||
animal: 'Animals',
|
||||
game: 'Cards & Chess',
|
||||
dialog_balloon: 'Dialog balloons',
|
||||
electronics: 'Electronics',
|
||||
math: 'Mathematical',
|
||||
music: 'Music',
|
||||
misc: 'Miscellaneous',
|
||||
raphael_1: 'raphaeljs.com set 1',
|
||||
raphael_2: 'raphaeljs.com set 2'
|
||||
},
|
||||
buttons: [{
|
||||
title: "Bibliothèque d'images"
|
||||
}]
|
||||
};
|
||||
|
||||
return fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,23 @@
|
|||
var svgEditorExtensionLocale_star_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'star',
|
||||
buttons: [{
|
||||
title: 'Star Tool'
|
||||
}],
|
||||
contextTools: [{
|
||||
title: 'Number of Sides',
|
||||
label: 'points'
|
||||
}, {
|
||||
title: 'Pointiness',
|
||||
label: 'Pointiness'
|
||||
}, {
|
||||
title: 'Twists the star',
|
||||
label: 'Radial Shift'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,17 @@
|
|||
var svgEditorExtensionLocale_storage_de = (function () {
|
||||
'use strict';
|
||||
|
||||
var de = {
|
||||
message: 'Standardmäßig kann SVG-Edit Ihre Editor-Einstellungen ' + 'und die SVG-Inhalte lokal auf Ihrem Gerät abspeichern. So brauchen Sie ' + 'nicht jedes Mal die SVG neu laden. Falls Sie aus Datenschutzgründen ' + 'dies nicht wollen, ' + 'können Sie die Standardeinstellung im Folgenden ändern.',
|
||||
storagePrefsAndContent: 'Store preferences and SVG content locally',
|
||||
storagePrefsOnly: 'Only store preferences locally',
|
||||
storagePrefs: 'Store preferences locally',
|
||||
storageNoPrefsOrContent: 'Do not store my preferences or SVG content locally',
|
||||
storageNoPrefs: 'Do not store my preferences locally',
|
||||
rememberLabel: 'Remember this choice?',
|
||||
rememberTooltip: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.'
|
||||
};
|
||||
|
||||
return de;
|
||||
|
||||
}());
|
|
@ -0,0 +1,17 @@
|
|||
var svgEditorExtensionLocale_storage_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
message: 'By default and where supported, SVG-Edit can store your editor ' + 'preferences and SVG content locally on your machine so you do not ' + 'need to add these back each time you load SVG-Edit. If, for privacy ' + 'reasons, you do not wish to store this information on your machine, ' + 'you can change away from the default option below.',
|
||||
storagePrefsAndContent: 'Store preferences and SVG content locally',
|
||||
storagePrefsOnly: 'Only store preferences locally',
|
||||
storagePrefs: 'Store preferences locally',
|
||||
storageNoPrefsOrContent: 'Do not store my preferences or SVG content locally',
|
||||
storageNoPrefs: 'Do not store my preferences locally',
|
||||
rememberLabel: 'Remember this choice?',
|
||||
rememberTooltip: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.'
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,17 @@
|
|||
var svgEditorExtensionLocale_storage_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var fr = {
|
||||
message: "Par défaut et si supporté, SVG-Edit peut stocker les préférences de l'éditeur " + "et le contenu SVG localement sur votre machine de sorte que vous n'ayez pas besoin de les " + 'rajouter chaque fois que vous chargez SVG-Edit. Si, pour des raisons de confidentialité, ' + 'vous ne souhaitez pas stocker ces données sur votre machine, vous pouvez changer ce ' + 'comportement ci-dessous.',
|
||||
storagePrefsAndContent: 'Store preferences and SVG content locally',
|
||||
storagePrefsOnly: 'Only store preferences locally',
|
||||
storagePrefs: 'Store preferences locally',
|
||||
storageNoPrefsOrContent: 'Do not store my preferences or SVG content locally',
|
||||
storageNoPrefs: 'Do not store my preferences locally',
|
||||
rememberLabel: 'Remember this choice?',
|
||||
rememberTooltip: "Si vous choisissez de désactiver le stockage en mémorisant le choix, l'URL va changer afin que la question ne vous soit plus reposée."
|
||||
};
|
||||
|
||||
return fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,13 @@
|
|||
var svgEditorExtensionLocale_webappfind_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var en = {
|
||||
name: 'WebAppFind',
|
||||
buttons: [{
|
||||
title: 'Save Image back to Disk'
|
||||
}]
|
||||
};
|
||||
|
||||
return en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,664 @@
|
|||
var svgEditorExtension_markers = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-markers.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
* @copyright 2010 Will Schleter based on ext-arrows.js by Copyright(c) 2010 Alexis Deveria
|
||||
*
|
||||
* This extension provides for the addition of markers to the either end
|
||||
* or the middle of a line, polyline, path, polygon.
|
||||
*
|
||||
* Markers may be either a graphic or arbitary text
|
||||
*
|
||||
* to simplify the coding and make the implementation as robust as possible,
|
||||
* markers are not shared - every object has its own set of markers.
|
||||
* this relationship is maintained by a naming convention between the
|
||||
* ids of the markers and the ids of the object
|
||||
*
|
||||
* The following restrictions exist for simplicty of use and programming
|
||||
* objects and their markers to have the same color
|
||||
* marker size is fixed
|
||||
* text marker font, size, and attributes are fixed
|
||||
* an application specific attribute - se_type - is added to each marker element
|
||||
* to store the type of marker
|
||||
*
|
||||
* @todo
|
||||
* remove some of the restrictions above
|
||||
* add option for keeping text aligned to horizontal
|
||||
* add support for dimension extension lines
|
||||
*
|
||||
*/
|
||||
var extMarkers = {
|
||||
name: 'markers',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(S) {
|
||||
var strings, svgEditor, $, svgCanvas, addElem, mtypes, markerPrefix, idPrefix, markerTypes, getLinked, setIcon, selElems, showPanel, addMarker, convertline, setMarker, colorChanged, updateReferences, triggerTextEntry, showTextPrompt, setArrowFromButton, getTitle, buildButtonList, contextTools;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
buildButtonList = function buildButtonList(lang) {
|
||||
var buttons = [];
|
||||
// const i = 0;
|
||||
/*
|
||||
buttons.push({
|
||||
id: idPrefix + 'markers_off',
|
||||
title: 'Turn off all markers',
|
||||
type: 'context',
|
||||
events: { click: setMarkerSet },
|
||||
panel: 'marker_panel'
|
||||
});
|
||||
buttons.push({
|
||||
id: idPrefix + 'markers_dimension',
|
||||
title: 'Dimension',
|
||||
type: 'context',
|
||||
events: { click: setMarkerSet },
|
||||
panel: 'marker_panel'
|
||||
});
|
||||
buttons.push({
|
||||
id: idPrefix + 'markers_label',
|
||||
title: 'Label',
|
||||
type: 'context',
|
||||
events: { click: setMarkerSet },
|
||||
panel: 'marker_panel'
|
||||
});
|
||||
*/
|
||||
$.each(mtypes, function (k, pos) {
|
||||
var listname = pos + '_marker_list';
|
||||
var def = true;
|
||||
Object.keys(markerTypes).forEach(function (id) {
|
||||
var title = getTitle(String(id));
|
||||
buttons.push({
|
||||
id: idPrefix + pos + '_' + id,
|
||||
svgicon: id,
|
||||
icon: svgEditor.curConfig.extIconsPath + 'markers-' + id + '.png',
|
||||
title: title,
|
||||
type: 'context',
|
||||
events: { click: setArrowFromButton },
|
||||
panel: 'marker_panel',
|
||||
list: listname,
|
||||
isDefault: def
|
||||
});
|
||||
def = false;
|
||||
});
|
||||
});
|
||||
return buttons;
|
||||
};
|
||||
|
||||
getTitle = function getTitle(id) {
|
||||
var langList = strings.langList;
|
||||
|
||||
var item = langList.find(function (item) {
|
||||
return item.id === id;
|
||||
});
|
||||
return item ? item.title : id;
|
||||
};
|
||||
|
||||
setArrowFromButton = function setArrowFromButton(obj) {
|
||||
var parts = this.id.split('_');
|
||||
var pos = parts[1];
|
||||
var val = parts[2];
|
||||
if (parts[3]) {
|
||||
val += '_' + parts[3];
|
||||
}
|
||||
|
||||
if (val !== 'textmarker') {
|
||||
triggerTextEntry(pos, '\\' + val);
|
||||
} else {
|
||||
showTextPrompt(pos);
|
||||
}
|
||||
};
|
||||
|
||||
showTextPrompt = function showTextPrompt(pos) {
|
||||
var def = $('#' + pos + '_marker').val();
|
||||
if (def.substr(0, 1) === '\\') {
|
||||
def = '';
|
||||
}
|
||||
$.prompt('Enter text for ' + pos + ' marker', def, function (txt) {
|
||||
if (txt) {
|
||||
triggerTextEntry(pos, txt);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
triggerTextEntry = function triggerTextEntry(pos, val) {
|
||||
$('#' + pos + '_marker').val(val);
|
||||
$('#' + pos + '_marker').change();
|
||||
// const txtbox = $('#'+pos+'_marker');
|
||||
// if (val.substr(0,1)=='\\') {txtbox.hide();}
|
||||
// else {txtbox.show();}
|
||||
};
|
||||
|
||||
updateReferences = function updateReferences(el) {
|
||||
$.each(mtypes, function (i, pos) {
|
||||
var id = markerPrefix + pos + '_' + el.id;
|
||||
var markerName = 'marker-' + pos;
|
||||
var marker = getLinked(el, markerName);
|
||||
if (!marker || !marker.attributes.se_type) {
|
||||
return;
|
||||
} // not created by this extension
|
||||
var url = el.getAttribute(markerName);
|
||||
if (url) {
|
||||
var len = el.id.length;
|
||||
var linkid = url.substr(-len - 1, len);
|
||||
if (el.id !== linkid) {
|
||||
var val = $('#' + pos + '_marker').attr('value');
|
||||
addMarker(id, val);
|
||||
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + id + ')');
|
||||
if (el.tagName === 'line' && pos === 'mid') {
|
||||
el = convertline(el);
|
||||
}
|
||||
svgCanvas.call('changed', selElems);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
colorChanged = function colorChanged(elem) {
|
||||
var color = elem.getAttribute('stroke');
|
||||
|
||||
$.each(mtypes, function (i, pos) {
|
||||
var marker = getLinked(elem, 'marker-' + pos);
|
||||
if (!marker) {
|
||||
return;
|
||||
}
|
||||
if (!marker.attributes.se_type) {
|
||||
return;
|
||||
} // not created by this extension
|
||||
var ch = marker.lastElementChild;
|
||||
if (!ch) {
|
||||
return;
|
||||
}
|
||||
var curfill = ch.getAttribute('fill');
|
||||
var curstroke = ch.getAttribute('stroke');
|
||||
if (curfill && curfill !== 'none') {
|
||||
ch.setAttribute('fill', color);
|
||||
}
|
||||
if (curstroke && curstroke !== 'none') {
|
||||
ch.setAttribute('stroke', color);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
setMarker = function setMarker() {
|
||||
var poslist = { start_marker: 'start', mid_marker: 'mid', end_marker: 'end' };
|
||||
var pos = poslist[this.id];
|
||||
var markerName = 'marker-' + pos;
|
||||
var el = selElems[0];
|
||||
var marker = getLinked(el, markerName);
|
||||
if (marker) {
|
||||
$(marker).remove();
|
||||
}
|
||||
el.removeAttribute(markerName);
|
||||
var val = this.value;
|
||||
if (val === '') {
|
||||
val = '\\nomarker';
|
||||
}
|
||||
if (val === '\\nomarker') {
|
||||
setIcon(pos, val);
|
||||
svgCanvas.call('changed', selElems);
|
||||
return;
|
||||
}
|
||||
// Set marker on element
|
||||
var id = markerPrefix + pos + '_' + el.id;
|
||||
addMarker(id, val);
|
||||
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + id + ')');
|
||||
if (el.tagName === 'line' && pos === 'mid') {
|
||||
el = convertline(el);
|
||||
}
|
||||
svgCanvas.call('changed', selElems);
|
||||
setIcon(pos, val);
|
||||
};
|
||||
|
||||
convertline = function convertline(elem) {
|
||||
// this routine came from the connectors extension
|
||||
// it is needed because midpoint markers don't work with line elements
|
||||
if (!(elem.tagName === 'line')) {
|
||||
return elem;
|
||||
}
|
||||
|
||||
// Convert to polyline to accept mid-arrow
|
||||
|
||||
var x1 = Number(elem.getAttribute('x1'));
|
||||
var x2 = Number(elem.getAttribute('x2'));
|
||||
var y1 = Number(elem.getAttribute('y1'));
|
||||
var y2 = Number(elem.getAttribute('y2'));
|
||||
var id = elem.id;
|
||||
|
||||
|
||||
var midPt = ' ' + (x1 + x2) / 2 + ',' + (y1 + y2) / 2 + ' ';
|
||||
var pline = addElem({
|
||||
element: 'polyline',
|
||||
attr: {
|
||||
points: x1 + ',' + y1 + midPt + x2 + ',' + y2,
|
||||
stroke: elem.getAttribute('stroke'),
|
||||
'stroke-width': elem.getAttribute('stroke-width'),
|
||||
fill: 'none',
|
||||
opacity: elem.getAttribute('opacity') || 1
|
||||
}
|
||||
});
|
||||
$.each(mtypes, function (i, pos) {
|
||||
// get any existing marker definitions
|
||||
var nam = 'marker-' + pos;
|
||||
var m = elem.getAttribute(nam);
|
||||
if (m) {
|
||||
pline.setAttribute(nam, elem.getAttribute(nam));
|
||||
}
|
||||
});
|
||||
|
||||
var batchCmd = new S.BatchCommand();
|
||||
batchCmd.addSubCommand(new S.RemoveElementCommand(elem, elem.parentNode));
|
||||
batchCmd.addSubCommand(new S.InsertElementCommand(pline));
|
||||
|
||||
$(elem).after(pline).remove();
|
||||
svgCanvas.clearSelection();
|
||||
pline.id = id;
|
||||
svgCanvas.addToSelection([pline]);
|
||||
S.addCommandToHistory(batchCmd);
|
||||
return pline;
|
||||
};
|
||||
|
||||
addMarker = function addMarker(id, val) {
|
||||
var txtBoxBg = '#ffffff';
|
||||
var txtBoxBorder = 'none';
|
||||
var txtBoxStrokeWidth = 0;
|
||||
|
||||
var marker = svgCanvas.getElem(id);
|
||||
if (marker) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (val === '' || val === '\\nomarker') {
|
||||
return;
|
||||
}
|
||||
|
||||
var el = selElems[0];
|
||||
var color = el.getAttribute('stroke');
|
||||
// NOTE: Safari didn't like a negative value in viewBox
|
||||
// so we use a standardized 0 0 100 100
|
||||
// with 50 50 being mapped to the marker position
|
||||
var strokeWidth = 10;
|
||||
var refX = 50;
|
||||
var refY = 50;
|
||||
var viewBox = '0 0 100 100';
|
||||
var markerWidth = 5;
|
||||
var markerHeight = 5;
|
||||
var seType = void 0;
|
||||
if (val.substr(0, 1) === '\\') {
|
||||
seType = val.substr(1);
|
||||
} else {
|
||||
seType = 'textmarker';
|
||||
}
|
||||
|
||||
if (!markerTypes[seType]) {
|
||||
return;
|
||||
} // an unknown type!
|
||||
|
||||
// create a generic marker
|
||||
marker = addElem({
|
||||
element: 'marker',
|
||||
attr: {
|
||||
id: id,
|
||||
markerUnits: 'strokeWidth',
|
||||
orient: 'auto',
|
||||
style: 'pointer-events:none',
|
||||
se_type: seType
|
||||
}
|
||||
});
|
||||
|
||||
if (seType !== 'textmarker') {
|
||||
var mel = addElem(markerTypes[seType]);
|
||||
var fillcolor = seType.substr(-2) === '_o' ? 'none' : color;
|
||||
|
||||
mel.setAttribute('fill', fillcolor);
|
||||
mel.setAttribute('stroke', color);
|
||||
mel.setAttribute('stroke-width', strokeWidth);
|
||||
marker.append(mel);
|
||||
} else {
|
||||
var text = addElem(markerTypes[seType]);
|
||||
// have to add text to get bounding box
|
||||
text.textContent = val;
|
||||
var tb = text.getBBox();
|
||||
// alert(tb.x + ' ' + tb.y + ' ' + tb.width + ' ' + tb.height);
|
||||
var pad = 1;
|
||||
var bb = tb;
|
||||
bb.x = 0;
|
||||
bb.y = 0;
|
||||
bb.width += pad * 2;
|
||||
bb.height += pad * 2;
|
||||
// shift text according to its size
|
||||
text.setAttribute('x', pad);
|
||||
text.setAttribute('y', bb.height - pad - tb.height / 4); // kludge?
|
||||
text.setAttribute('fill', color);
|
||||
refX = bb.width / 2 + pad;
|
||||
refY = bb.height / 2 + pad;
|
||||
viewBox = bb.x + ' ' + bb.y + ' ' + bb.width + ' ' + bb.height;
|
||||
markerWidth = bb.width / 10;
|
||||
markerHeight = bb.height / 10;
|
||||
|
||||
var box = addElem({
|
||||
element: 'rect',
|
||||
attr: {
|
||||
x: bb.x,
|
||||
y: bb.y,
|
||||
width: bb.width,
|
||||
height: bb.height,
|
||||
fill: txtBoxBg,
|
||||
stroke: txtBoxBorder,
|
||||
'stroke-width': txtBoxStrokeWidth
|
||||
}
|
||||
});
|
||||
marker.setAttribute('orient', 0);
|
||||
marker.append(box, text);
|
||||
}
|
||||
|
||||
marker.setAttribute('viewBox', viewBox);
|
||||
marker.setAttribute('markerWidth', markerWidth);
|
||||
marker.setAttribute('markerHeight', markerHeight);
|
||||
marker.setAttribute('refX', refX);
|
||||
marker.setAttribute('refY', refY);
|
||||
svgCanvas.findDefs().append(marker);
|
||||
|
||||
return marker;
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
$('#marker_panel').toggle(on);
|
||||
|
||||
if (on) {
|
||||
var el = selElems[0];
|
||||
|
||||
var val = void 0,
|
||||
ci = void 0;
|
||||
$.each(mtypes, function (i, pos) {
|
||||
var m = getLinked(el, 'marker-' + pos);
|
||||
var txtbox = $('#' + pos + '_marker');
|
||||
if (!m) {
|
||||
val = '\\nomarker';
|
||||
ci = val;
|
||||
txtbox.hide(); // hide text box
|
||||
} else {
|
||||
if (!m.attributes.se_type) {
|
||||
return;
|
||||
} // not created by this extension
|
||||
val = '\\' + m.attributes.se_type.textContent;
|
||||
ci = val;
|
||||
if (val === '\\textmarker') {
|
||||
val = m.lastChild.textContent;
|
||||
// txtbox.show(); // show text box
|
||||
} else {
|
||||
txtbox.hide(); // hide text box
|
||||
}
|
||||
}
|
||||
txtbox.val(val);
|
||||
setIcon(pos, ci);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
setIcon = function setIcon(pos, id) {
|
||||
if (id.substr(0, 1) !== '\\') {
|
||||
id = '\\textmarker';
|
||||
}
|
||||
var ci = '#' + idPrefix + pos + '_' + id.substr(1);
|
||||
svgEditor.setIcon('#cur_' + pos + '_marker_list', $(ci).children());
|
||||
$(ci).addClass('current').siblings().removeClass('current');
|
||||
};
|
||||
|
||||
getLinked = function getLinked(elem, attr) {
|
||||
var str = elem.getAttribute(attr);
|
||||
if (!str) {
|
||||
return null;
|
||||
}
|
||||
var m = str.match(/\(#(.*)\)/);
|
||||
if (!m || m.length !== 2) {
|
||||
return null;
|
||||
}
|
||||
return svgCanvas.getElem(m[1]);
|
||||
};
|
||||
|
||||
_context2.next = 15;
|
||||
return S.importLocale();
|
||||
|
||||
case 15:
|
||||
strings = _context2.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
addElem = svgCanvas.addSVGElementFromJson;
|
||||
mtypes = ['start', 'mid', 'end'];
|
||||
markerPrefix = 'se_marker_';
|
||||
idPrefix = 'mkr_';
|
||||
|
||||
// note - to add additional marker types add them below with a unique id
|
||||
// and add the associated icon(s) to marker-icons.svg
|
||||
// the geometry is normalized to a 100x100 box with the origin at lower left
|
||||
// Safari did not like negative values for low left of viewBox
|
||||
// remember that the coordinate system has +y downward
|
||||
|
||||
markerTypes = {
|
||||
nomarker: {},
|
||||
leftarrow: { element: 'path', attr: { d: 'M0,50 L100,90 L70,50 L100,10 Z' } },
|
||||
rightarrow: { element: 'path', attr: { d: 'M100,50 L0,90 L30,50 L0,10 Z' } },
|
||||
textmarker: { element: 'text', attr: { x: 0, y: 0, 'stroke-width': 0, stroke: 'none', 'font-size': 75, 'font-family': 'serif', 'text-anchor': 'left',
|
||||
'xml:space': 'preserve' } },
|
||||
forwardslash: { element: 'path', attr: { d: 'M30,100 L70,0' } },
|
||||
reverseslash: { element: 'path', attr: { d: 'M30,0 L70,100' } },
|
||||
verticalslash: { element: 'path', attr: { d: 'M50,0 L50,100' } },
|
||||
box: { element: 'path', attr: { d: 'M20,20 L20,80 L80,80 L80,20 Z' } },
|
||||
star: { element: 'path', attr: { d: 'M10,30 L90,30 L20,90 L50,10 L80,90 Z' } },
|
||||
xmark: { element: 'path', attr: { d: 'M20,80 L80,20 M80,80 L20,20' } },
|
||||
triangle: { element: 'path', attr: { d: 'M10,80 L50,20 L80,80 Z' } },
|
||||
mcircle: { element: 'circle', attr: { r: 30, cx: 50, cy: 50 } }
|
||||
};
|
||||
|
||||
// duplicate shapes to support unfilled (open) marker types with an _o suffix
|
||||
|
||||
['leftarrow', 'rightarrow', 'box', 'star', 'mcircle', 'triangle'].forEach(function (v) {
|
||||
markerTypes[v + '_o'] = markerTypes[v];
|
||||
});
|
||||
|
||||
/**
|
||||
* @param {Element} elem - A graphic element will have an attribute like marker-start
|
||||
* @param {"marker-start"|"marker-mid"|"marker-end"} attr
|
||||
* @returns {Element} The marker element that is linked to the graphic element
|
||||
*/
|
||||
selElems = void 0;
|
||||
// toggles context tool panel off/on
|
||||
// sets the controls with the selected element's settings
|
||||
|
||||
|
||||
// called when the main system modifies an object
|
||||
// this routine changes the associated markers to be the same color
|
||||
|
||||
|
||||
// called when the main system creates or modifies an object
|
||||
// primary purpose is create new markers for cloned objects
|
||||
|
||||
|
||||
// simulate a change event a text box that stores the current element's marker type
|
||||
|
||||
|
||||
/*
|
||||
function setMarkerSet(obj) {
|
||||
const parts = this.id.split('_');
|
||||
const set = parts[2];
|
||||
switch (set) {
|
||||
case 'off':
|
||||
triggerTextEntry('start','\\nomarker');
|
||||
triggerTextEntry('mid','\\nomarker');
|
||||
triggerTextEntry('end','\\nomarker');
|
||||
break;
|
||||
case 'dimension':
|
||||
triggerTextEntry('start','\\leftarrow');
|
||||
triggerTextEntry('end','\\rightarrow');
|
||||
showTextPrompt('mid');
|
||||
break;
|
||||
case 'label':
|
||||
triggerTextEntry('mid','\\nomarker');
|
||||
triggerTextEntry('end','\\rightarrow');
|
||||
showTextPrompt('start');
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// callback function for a toolbar button click
|
||||
|
||||
|
||||
// build the toolbar button array from the marker definitions
|
||||
|
||||
contextTools = [{
|
||||
type: 'input',
|
||||
panel: 'marker_panel',
|
||||
id: 'start_marker',
|
||||
size: 3,
|
||||
events: { change: setMarker }
|
||||
}, {
|
||||
type: 'button-select',
|
||||
panel: 'marker_panel',
|
||||
id: 'start_marker_list',
|
||||
colnum: 3,
|
||||
events: { change: setArrowFromButton }
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'marker_panel',
|
||||
id: 'mid_marker',
|
||||
defval: '',
|
||||
size: 3,
|
||||
events: { change: setMarker }
|
||||
}, {
|
||||
type: 'button-select',
|
||||
panel: 'marker_panel',
|
||||
id: 'mid_marker_list',
|
||||
colnum: 3,
|
||||
events: { change: setArrowFromButton }
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'marker_panel',
|
||||
id: 'end_marker',
|
||||
size: 3,
|
||||
events: { change: setMarker }
|
||||
}, {
|
||||
type: 'button-select',
|
||||
panel: 'marker_panel',
|
||||
id: 'end_marker_list',
|
||||
colnum: 3,
|
||||
events: { change: setArrowFromButton }
|
||||
}];
|
||||
return _context2.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'markers-icons.xml',
|
||||
callback: function callback() {
|
||||
$('#marker_panel').addClass('toolset').hide();
|
||||
},
|
||||
addLangData: function () {
|
||||
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref2) {
|
||||
var importLocale = _ref2.importLocale,
|
||||
lang = _ref2.lang;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
return _context.abrupt('return', { data: strings.langList });
|
||||
|
||||
case 1:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function addLangData(_x2) {
|
||||
return _ref3.apply(this, arguments);
|
||||
}
|
||||
|
||||
return addLangData;
|
||||
}(),
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// Use this to update the current selected elements
|
||||
// console.log('selectChanged',opts);
|
||||
selElems = opts.elems;
|
||||
|
||||
var markerElems = ['line', 'path', 'polyline', 'polygon'];
|
||||
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && markerElems.includes(elem.tagName)) {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
// console.log('elementChanged',opts);
|
||||
var elem = opts.elems[0];
|
||||
if (elem && (elem.getAttribute('marker-start') || elem.getAttribute('marker-mid') || elem.getAttribute('marker-end'))) {
|
||||
colorChanged(elem);
|
||||
updateReferences(elem);
|
||||
}
|
||||
// changing_flag = false; // Not apparently in use
|
||||
},
|
||||
|
||||
buttons: buildButtonList(),
|
||||
context_tools: contextTools
|
||||
});
|
||||
|
||||
case 28:
|
||||
case 'end':
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extMarkers;
|
||||
|
||||
}());
|
|
@ -0,0 +1,452 @@
|
|||
var svgEditorExtension_mathjax = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var _extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
// MIT License
|
||||
// From: https://github.com/uupaa/dynamic-import-polyfill/blob/master/importModule.js
|
||||
|
||||
/**
|
||||
* @module importModule
|
||||
*/
|
||||
|
||||
function toAbsoluteURL(url) {
|
||||
var a = document.createElement('a');
|
||||
a.setAttribute('href', url); // <a href="hoge.html">
|
||||
return a.cloneNode(false).href; // -> "http://example.com/hoge.html"
|
||||
}
|
||||
|
||||
function addScriptAtts(script, atts) {
|
||||
['id', 'class', 'type'].forEach(function (prop) {
|
||||
if (prop in atts) {
|
||||
script[prop] = atts[prop];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Additions by Brett
|
||||
/**
|
||||
* @typedef {PlainObject} module:importModule.ImportConfig
|
||||
* @property {string} global The variable name to set on `window` (when not using the modular version)
|
||||
* @property {boolean} [returnDefault=false]
|
||||
*/
|
||||
/**
|
||||
* @function module:importModule.importSetGlobalDefault
|
||||
* @param {string} url
|
||||
* @param {module:importModule.ImportConfig} config
|
||||
* @returns {*} The return depends on the export of the targeted module.
|
||||
*/
|
||||
var importSetGlobalDefault = function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(url, config) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
return _context.abrupt('return', importSetGlobal(url, _extends({}, config, { returnDefault: true })));
|
||||
|
||||
case 1:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
return function importSetGlobalDefault(_x, _x2) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
/**
|
||||
* @function module:importModule.importSetGlobal
|
||||
* @param {string} url
|
||||
* @param {module:importModule.ImportConfig} config
|
||||
* @returns {ArbitraryModule|*} The return depends on the export of the targeted module.
|
||||
*/
|
||||
var importSetGlobal = function () {
|
||||
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(url, _ref2) {
|
||||
var global = _ref2.global,
|
||||
returnDefault = _ref2.returnDefault;
|
||||
var modularVersion;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
// Todo: Replace calls to this function with `import()` when supported
|
||||
modularVersion = !('svgEditor' in window) || !window.svgEditor || window.svgEditor.modules !== false;
|
||||
|
||||
if (!modularVersion) {
|
||||
_context2.next = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context2.abrupt('return', importModule(url, undefined, { returnDefault: returnDefault }));
|
||||
|
||||
case 3:
|
||||
_context2.next = 5;
|
||||
return importScript(url);
|
||||
|
||||
case 5:
|
||||
return _context2.abrupt('return', window[global]);
|
||||
|
||||
case 6:
|
||||
case 'end':
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
return function importSetGlobal(_x3, _x4) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
// Addition by Brett
|
||||
function importScript(url) {
|
||||
var atts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
if (Array.isArray(url)) {
|
||||
return Promise.all(url.map(function (u) {
|
||||
return importScript(u, atts);
|
||||
}));
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
var script = document.createElement('script');
|
||||
var destructor = function destructor() {
|
||||
script.onerror = null;
|
||||
script.onload = null;
|
||||
script.remove();
|
||||
script.src = '';
|
||||
};
|
||||
script.defer = 'defer';
|
||||
addScriptAtts(script, atts);
|
||||
script.onerror = function () {
|
||||
reject(new Error('Failed to import: ' + url));
|
||||
destructor();
|
||||
};
|
||||
script.onload = function () {
|
||||
resolve();
|
||||
destructor();
|
||||
};
|
||||
script.src = url;
|
||||
|
||||
document.head.append(script);
|
||||
});
|
||||
}
|
||||
|
||||
function importModule(url) {
|
||||
var atts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
||||
_ref4$returnDefault = _ref4.returnDefault,
|
||||
returnDefault = _ref4$returnDefault === undefined ? false : _ref4$returnDefault;
|
||||
|
||||
if (Array.isArray(url)) {
|
||||
return Promise.all(url.map(function (u) {
|
||||
return importModule(u, atts);
|
||||
}));
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
var vector = '$importModule$' + Math.random().toString(32).slice(2);
|
||||
var script = document.createElement('script');
|
||||
var destructor = function destructor() {
|
||||
delete window[vector];
|
||||
script.onerror = null;
|
||||
script.onload = null;
|
||||
script.remove();
|
||||
URL.revokeObjectURL(script.src);
|
||||
script.src = '';
|
||||
};
|
||||
addScriptAtts(script, atts);
|
||||
script.defer = 'defer';
|
||||
script.type = 'module';
|
||||
script.onerror = function () {
|
||||
reject(new Error('Failed to import: ' + url));
|
||||
destructor();
|
||||
};
|
||||
script.onload = function () {
|
||||
resolve(window[vector]);
|
||||
destructor();
|
||||
};
|
||||
var absURL = toAbsoluteURL(url);
|
||||
var loader = 'import * as m from \'' + absURL.replace(/'/g, "\\'") + '\'; window.' + vector + ' = ' + (returnDefault ? 'm.default || ' : '') + 'm;'; // export Module
|
||||
var blob = new Blob([loader], { type: 'text/javascript' });
|
||||
script.src = URL.createObjectURL(blob);
|
||||
|
||||
document.head.append(script);
|
||||
});
|
||||
}
|
||||
|
||||
/* globals jQuery, MathJax */
|
||||
|
||||
var extMathjax = {
|
||||
name: 'mathjax',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, $, svgCanvas, mathjaxSrcSecure, uiStrings, math, locationX, locationY, mathjaxLoaded, saveMath, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
saveMath = function saveMath() {
|
||||
var code = $('#mathjax_code_textarea').val();
|
||||
// displaystyle to force MathJax NOT to use the inline style. Because it is
|
||||
// less fancy!
|
||||
MathJax.Hub.queue.Push(['Text', math, '\\displaystyle{' + code + '}']);
|
||||
|
||||
/*
|
||||
* The MathJax library doesn't want to bloat your webpage so it creates
|
||||
* every symbol (glymph) you need only once. These are saved in a `<svg>` on
|
||||
* the top of your html document, just under the body tag. Each glymph has
|
||||
* its unique id and is saved as a `<path>` in the `<defs>` tag of the `<svg>`
|
||||
*
|
||||
* Then when the symbols are needed in the rest of your html document they
|
||||
* are refferd to by a `<use>` tag.
|
||||
* Because of bug 1076 we can't just grab the defs tag on the top and add it
|
||||
* to your formula's `<svg>` and copy the lot. So we have to replace each
|
||||
* `<use>` tag by its `<path>`.
|
||||
*/
|
||||
MathJax.Hub.queue.Push(function () {
|
||||
var mathjaxMath = $('.MathJax_SVG');
|
||||
var svg = $(mathjaxMath.html());
|
||||
svg.find('use').each(function () {
|
||||
// TODO: find a less pragmatic and more elegant solution to this.
|
||||
var id = $(this).attr('href') ? $(this).attr('href').slice(1) // Works in Chrome.
|
||||
: $(this).attr('xlink:href').slice(1); // Works in Firefox.
|
||||
var glymph = $('#' + id).clone().removeAttr('id');
|
||||
var x = $(this).attr('x');
|
||||
var y = $(this).attr('y');
|
||||
var transform = $(this).attr('transform');
|
||||
if (transform && (x || y)) {
|
||||
glymph.attr('transform', transform + ' translate(' + x + ',' + y + ')');
|
||||
} else if (transform) {
|
||||
glymph.attr('transform', transform);
|
||||
} else if (x || y) {
|
||||
glymph.attr('transform', 'translate(' + x + ',' + y + ')');
|
||||
}
|
||||
$(this).replaceWith(glymph);
|
||||
});
|
||||
// Remove the style tag because it interferes with SVG-Edit.
|
||||
svg.removeAttr('style');
|
||||
svg.attr('xmlns', 'http://www.w3.org/2000/svg');
|
||||
svgCanvas.importSvgString($('<div>').append(svg.clone()).html(), true);
|
||||
svgCanvas.ungroupSelectedElement();
|
||||
// TODO: To undo the adding of the Formula you now have to undo twice.
|
||||
// This should only be once!
|
||||
svgCanvas.moveSelectedElements(locationX, locationY, true);
|
||||
});
|
||||
};
|
||||
|
||||
_context.next = 3;
|
||||
return importLocale();
|
||||
|
||||
case 3:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
|
||||
// Configuration of the MathJax extention.
|
||||
|
||||
// This will be added to the head tag before MathJax is loaded.
|
||||
|
||||
/* mathjaxConfiguration = `<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ['tex2jax.js'],
|
||||
jax: ['input/TeX', 'output/SVG'],
|
||||
showProcessingMessages: true,
|
||||
showMathMenu: false,
|
||||
showMathMenuMSIE: false,
|
||||
errorSettings: {
|
||||
message: ['[Math Processing Error]'],
|
||||
style: {color: '#CC0000', 'font-style': 'italic'}
|
||||
},
|
||||
elements: [],
|
||||
tex2jax: {
|
||||
ignoreClass: 'tex2jax_ignore2', processClass: 'tex2jax_process2',
|
||||
},
|
||||
TeX: {
|
||||
extensions: ['AMSmath.js', 'AMSsymbols.js', 'noErrors.js', 'noUndefined.js']
|
||||
},
|
||||
SVG: {
|
||||
}
|
||||
});
|
||||
</script>`, */
|
||||
// mathjaxSrc = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
|
||||
// Had been on https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG.js
|
||||
// Obtained Text-AMS-MML_SVG.js from https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.3/config/TeX-AMS-MML_SVG.js
|
||||
mathjaxSrcSecure = 'mathjax/MathJax.min.js?config=TeX-AMS-MML_SVG.js', uiStrings = svgEditor.uiStrings;
|
||||
math = void 0, locationX = void 0, locationY = void 0, mathjaxLoaded = false;
|
||||
|
||||
// TODO: Implement language support. Move these uiStrings to the locale files and the code to the langReady callback.
|
||||
|
||||
$.extend(uiStrings, {
|
||||
mathjax: {
|
||||
embed_svg: 'Save as mathematics',
|
||||
embed_mathml: 'Save as figure',
|
||||
svg_save_warning: 'The math will be transformed into a figure is manipulatable like everything else. You will not be able to manipulate the TeX-code anymore. ',
|
||||
mathml_save_warning: 'Advised. The math will be saved as a figure.',
|
||||
title: 'Mathematics code editor'
|
||||
}
|
||||
});
|
||||
|
||||
buttons = [{
|
||||
id: 'tool_mathjax',
|
||||
type: 'mode',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'mathjax.png',
|
||||
events: {
|
||||
click: function click() {
|
||||
// Only load Mathjax when needed, we don't want to strain Svg-Edit any more.
|
||||
// From this point on it is very probable that it will be needed, so load it.
|
||||
if (mathjaxLoaded === false) {
|
||||
$('<div id="mathjax">' + '<!-- Here is where MathJax creates the math -->' + '<div id="mathjax_creator" class="tex2jax_process" style="display:none">' + '$${}$$' + '</div>' + '<div id="mathjax_overlay"></div>' + '<div id="mathjax_container">' + '<div id="tool_mathjax_back" class="toolbar_button">' + '<button id="tool_mathjax_save">OK</button>' + '<button id="tool_mathjax_cancel">Cancel</button>' + '</div>' + '<fieldset>' + '<legend id="mathjax_legend">Mathematics Editor</legend>' + '<label>' + '<span id="mathjax_explication">Please type your mathematics in ' + '<a href="https://en.wikipedia.org/wiki/Help:Displaying_a_formula" target="_blank">TeX</a> code.</span></label>' + '<textarea id="mathjax_code_textarea" spellcheck="false"></textarea>' + '</fieldset>' + '</div>' + '</div>').insertAfter('#svg_prefs').hide();
|
||||
|
||||
// Make the MathEditor draggable.
|
||||
$('#mathjax_container').draggable({
|
||||
cancel: 'button,fieldset',
|
||||
containment: 'window'
|
||||
});
|
||||
|
||||
// Add functionality and picture to cancel button.
|
||||
$('#tool_mathjax_cancel').prepend($.getSvgIcon('cancel', true)).on('click touched', function () {
|
||||
$('#mathjax').hide();
|
||||
});
|
||||
|
||||
// Add functionality and picture to the save button.
|
||||
$('#tool_mathjax_save').prepend($.getSvgIcon('ok', true)).on('click touched', function () {
|
||||
saveMath();
|
||||
$('#mathjax').hide();
|
||||
});
|
||||
|
||||
// MathJax preprocessing has to ignore most of the page.
|
||||
$('body').addClass('tex2jax_ignore');
|
||||
|
||||
// Now get (and run) the MathJax Library.
|
||||
// Todo: insert script with modules once widely supported
|
||||
// and if MathJax (and its `TeX-AMS-MML_SVG.js` dependency) ends up
|
||||
// providing an ES6 module export: https://github.com/mathjax/MathJax/issues/1998
|
||||
/*
|
||||
const modularVersion = !('svgEditor' in window) ||
|
||||
!window.svgEditor ||
|
||||
window.svgEditor.modules !== false;
|
||||
// Add as second argument to `importScript`
|
||||
{
|
||||
type: modularVersion
|
||||
? 'module' // Make this the default when widely supported
|
||||
: 'text/javascript'
|
||||
}
|
||||
// If only using modules, just use this:
|
||||
const {default: MathJax} = await importModule( // or `import()` when widely supported
|
||||
svgEditor.curConfig.extIconsPath + mathjaxSrcSecure
|
||||
);
|
||||
*/
|
||||
importScript(svgEditor.curConfig.extIconsPath + mathjaxSrcSecure).then(function () {
|
||||
// When MathJax is loaded get the div where the math will be rendered.
|
||||
MathJax.Hub.queue.Push(function () {
|
||||
math = MathJax.Hub.getAllJax('#mathjax_creator')[0];
|
||||
console.log(math);
|
||||
mathjaxLoaded = true;
|
||||
console.log('MathJax Loaded');
|
||||
});
|
||||
}).catch(function () {
|
||||
console.log('Failed loadeing MathJax.');
|
||||
$.alert('Failed loading MathJax. You will not be able to change the mathematics.');
|
||||
});
|
||||
}
|
||||
// Set the mode.
|
||||
svgCanvas.setMode('mathjax');
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'mathjax-icons.xml',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
|
||||
mouseDown: function mouseDown() {
|
||||
if (svgCanvas.getMode() === 'mathjax') {
|
||||
return { started: true };
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp(opts) {
|
||||
if (svgCanvas.getMode() === 'mathjax') {
|
||||
// Get the coordinates from your mouse.
|
||||
var zoom = svgCanvas.getZoom();
|
||||
// Get the actual coordinate by dividing by the zoom value
|
||||
locationX = opts.mouse_x / zoom;
|
||||
locationY = opts.mouse_y / zoom;
|
||||
|
||||
$('#mathjax').show();
|
||||
return { started: false }; // Otherwise the last selected object dissapears.
|
||||
}
|
||||
},
|
||||
callback: function callback() {
|
||||
$('<style>').text('#mathjax fieldset{' + 'padding: 5px;' + 'margin: 5px;' + 'border: 1px solid #DDD;' + '}' + '#mathjax label{' + 'display: block;' + 'margin: .5em;' + '}' + '#mathjax legend {' + 'max-width:195px;' + '}' + '#mathjax_overlay {' + 'position: absolute;' + 'top: 0;' + 'left: 0;' + 'right: 0;' + 'bottom: 0;' + 'background-color: black;' + 'opacity: 0.6;' + 'z-index: 20000;' + '}' + '#mathjax_container {' + 'position: absolute;' + 'top: 50px;' + 'padding: 10px;' + 'background-color: #B0B0B0;' + 'border: 1px outset #777;' + 'opacity: 1.0;' + 'font-family: Verdana, Helvetica, sans-serif;' + 'font-size: .8em;' + 'z-index: 20001;' + '}' + '#tool_mathjax_back {' + 'margin-left: 1em;' + 'overflow: auto;' + '}' + '#mathjax_legend{' + 'font-weight: bold;' + 'font-size:1.1em;' + '}' + '#mathjax_code_textarea {\\n' + 'margin: 5px .7em;' + 'overflow: hidden;' + 'width: 416px;' + 'display: block;' + 'height: 100px;' + '}').appendTo('head');
|
||||
|
||||
// Add the MathJax configuration.
|
||||
// $(mathjaxConfiguration).appendTo('head');
|
||||
}
|
||||
});
|
||||
|
||||
case 12:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extMathjax;
|
||||
|
||||
}());
|
|
@ -0,0 +1,156 @@
|
|||
var svgEditorExtension_overview_window = (function () {
|
||||
'use strict';
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-overview_window.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2013 James Sacksteder
|
||||
*
|
||||
*/
|
||||
var extOverview_window = {
|
||||
name: 'overview_window',
|
||||
init: function init(_ref) {
|
||||
var isChrome = _ref.isChrome,
|
||||
isIE = _ref.isIE;
|
||||
|
||||
var $ = jQuery;
|
||||
var overviewWindowGlobals = {};
|
||||
// Disabled in Chrome 48-, see https://github.com/SVG-Edit/svgedit/issues/26 and
|
||||
// https://code.google.com/p/chromium/issues/detail?id=565120.
|
||||
if (isChrome()) {
|
||||
var verIndex = navigator.userAgent.indexOf('Chrome/') + 7;
|
||||
var chromeVersion = parseInt(navigator.userAgent.substring(verIndex), 10);
|
||||
if (chromeVersion < 49) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Define and insert the base html element.
|
||||
var propsWindowHtml = '<div id="overview_window_content_pane" style="width:100%; word-wrap:break-word; display:inline-block; margin-top:20px;">' + '<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>' + '</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>';
|
||||
$('#sidepanels').append(propsWindowHtml);
|
||||
|
||||
// Define dynamic animation of the view box.
|
||||
var updateViewBox = function updateViewBox() {
|
||||
var portHeight = parseFloat($('#workarea').css('height'));
|
||||
var portWidth = parseFloat($('#workarea').css('width'));
|
||||
var portX = $('#workarea').scrollLeft();
|
||||
var portY = $('#workarea').scrollTop();
|
||||
var windowWidth = parseFloat($('#svgcanvas').css('width'));
|
||||
var windowHeight = parseFloat($('#svgcanvas').css('height'));
|
||||
var overviewWidth = $('#overviewMiniView').attr('width');
|
||||
var overviewHeight = $('#overviewMiniView').attr('height');
|
||||
|
||||
var viewBoxX = portX / windowWidth * overviewWidth;
|
||||
var viewBoxY = portY / windowHeight * overviewHeight;
|
||||
var viewBoxWidth = portWidth / windowWidth * overviewWidth;
|
||||
var viewBoxHeight = portHeight / windowHeight * overviewHeight;
|
||||
|
||||
$('#overview_window_view_box').css('min-width', viewBoxWidth + 'px');
|
||||
$('#overview_window_view_box').css('min-height', viewBoxHeight + 'px');
|
||||
$('#overview_window_view_box').css('top', viewBoxY + 'px');
|
||||
$('#overview_window_view_box').css('left', viewBoxX + 'px');
|
||||
};
|
||||
$('#workarea').scroll(function () {
|
||||
if (!overviewWindowGlobals.viewBoxDragging) {
|
||||
updateViewBox();
|
||||
}
|
||||
});
|
||||
$('#workarea').resize(updateViewBox);
|
||||
updateViewBox();
|
||||
|
||||
// Compensate for changes in zoom and canvas size.
|
||||
var updateViewDimensions = function updateViewDimensions() {
|
||||
var viewWidth = $('#svgroot').attr('width');
|
||||
var viewHeight = $('#svgroot').attr('height');
|
||||
|
||||
var viewX = 640;
|
||||
var viewY = 480;
|
||||
if (isIE()) {
|
||||
// This has only been tested with Firefox 10 and IE 9 (without chrome frame).
|
||||
// I am not sure if if is Firefox or IE that is being non compliant here.
|
||||
// Either way the one that is noncompliant may become more compliant later.
|
||||
// TAG:HACK
|
||||
// TAG:VERSION_DEPENDENT
|
||||
// TAG:BROWSER_SNIFFING
|
||||
viewX = 0;
|
||||
viewY = 0;
|
||||
}
|
||||
|
||||
var svgWidthOld = $('#overviewMiniView').attr('width');
|
||||
var svgHeightNew = viewHeight / viewWidth * svgWidthOld;
|
||||
$('#overviewMiniView').attr('viewBox', viewX + ' ' + viewY + ' ' + viewWidth + ' ' + viewHeight);
|
||||
$('#overviewMiniView').attr('height', svgHeightNew);
|
||||
updateViewBox();
|
||||
};
|
||||
updateViewDimensions();
|
||||
|
||||
// Set up the overview window as a controller for the view port.
|
||||
overviewWindowGlobals.viewBoxDragging = false;
|
||||
var updateViewPortFromViewBox = function updateViewPortFromViewBox() {
|
||||
var windowWidth = parseFloat($('#svgcanvas').css('width'));
|
||||
var windowHeight = parseFloat($('#svgcanvas').css('height'));
|
||||
var overviewWidth = $('#overviewMiniView').attr('width');
|
||||
var overviewHeight = $('#overviewMiniView').attr('height');
|
||||
var viewBoxX = parseFloat($('#overview_window_view_box').css('left'));
|
||||
var viewBoxY = parseFloat($('#overview_window_view_box').css('top'));
|
||||
|
||||
var portX = viewBoxX / overviewWidth * windowWidth;
|
||||
var portY = viewBoxY / overviewHeight * windowHeight;
|
||||
|
||||
$('#workarea').scrollLeft(portX);
|
||||
$('#workarea').scrollTop(portY);
|
||||
};
|
||||
$('#overview_window_view_box').draggable({
|
||||
containment: 'parent',
|
||||
drag: updateViewPortFromViewBox,
|
||||
start: function start() {
|
||||
overviewWindowGlobals.viewBoxDragging = true;
|
||||
},
|
||||
stop: function stop() {
|
||||
overviewWindowGlobals.viewBoxDragging = false;
|
||||
}
|
||||
});
|
||||
$('#overviewMiniView').click(function (evt) {
|
||||
// Firefox doesn't support evt.offsetX and evt.offsetY.
|
||||
var mouseX = evt.offsetX || evt.originalEvent.layerX;
|
||||
var mouseY = evt.offsetY || evt.originalEvent.layerY;
|
||||
var overviewWidth = $('#overviewMiniView').attr('width');
|
||||
var overviewHeight = $('#overviewMiniView').attr('height');
|
||||
var viewBoxWidth = parseFloat($('#overview_window_view_box').css('min-width'));
|
||||
var viewBoxHeight = parseFloat($('#overview_window_view_box').css('min-height'));
|
||||
|
||||
var viewBoxX = mouseX - 0.5 * viewBoxWidth;
|
||||
var viewBoxY = mouseY - 0.5 * viewBoxHeight;
|
||||
// deal with constraints
|
||||
if (viewBoxX < 0) {
|
||||
viewBoxX = 0;
|
||||
}
|
||||
if (viewBoxY < 0) {
|
||||
viewBoxY = 0;
|
||||
}
|
||||
if (viewBoxX + viewBoxWidth > overviewWidth) {
|
||||
viewBoxX = overviewWidth - viewBoxWidth;
|
||||
}
|
||||
if (viewBoxY + viewBoxHeight > overviewHeight) {
|
||||
viewBoxY = overviewHeight - viewBoxHeight;
|
||||
}
|
||||
|
||||
$('#overview_window_view_box').css('top', viewBoxY + 'px');
|
||||
$('#overview_window_view_box').css('left', viewBoxX + 'px');
|
||||
updateViewPortFromViewBox();
|
||||
});
|
||||
|
||||
return {
|
||||
name: 'overview window',
|
||||
canvasUpdated: updateViewDimensions,
|
||||
workareaResized: updateViewBox
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return extOverview_window;
|
||||
|
||||
}());
|
|
@ -0,0 +1,112 @@
|
|||
var svgEditorExtension_panning = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ext-panning.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2013 Luis Aguirre
|
||||
*
|
||||
*/
|
||||
/*
|
||||
This is a very basic SVG-Edit extension to let tablet/mobile devices pan without problem
|
||||
*/
|
||||
var extPanning = {
|
||||
name: 'panning',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, svgCanvas, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return importLocale();
|
||||
|
||||
case 2:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
buttons = [{
|
||||
id: 'ext-panning',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'panning.png',
|
||||
type: 'mode',
|
||||
events: {
|
||||
click: function click() {
|
||||
svgCanvas.setMode('ext-panning');
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'ext-panning.xml',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
mouseDown: function mouseDown() {
|
||||
if (svgCanvas.getMode() === 'ext-panning') {
|
||||
svgEditor.setPanning(true);
|
||||
return { started: true };
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp() {
|
||||
if (svgCanvas.getMode() === 'ext-panning') {
|
||||
svgEditor.setPanning(false);
|
||||
return {
|
||||
keep: false,
|
||||
element: null
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
case 7:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extPanning;
|
||||
|
||||
}());
|
|
@ -0,0 +1,32 @@
|
|||
var svgEditorExtension_php_savefile = (function () {
|
||||
'use strict';
|
||||
|
||||
/* globals jQuery */
|
||||
// TODO: Might add support for "exportImage" custom
|
||||
// handler as in "ext-server_opensave.js" (and in savefile.php)
|
||||
|
||||
var extPhp_savefile = {
|
||||
name: 'php_savefile',
|
||||
init: function init() {
|
||||
var svgEditor = this;
|
||||
var $ = jQuery;
|
||||
var svgCanvas = svgEditor.canvas;
|
||||
function getFileNameFromTitle() {
|
||||
var title = svgCanvas.getDocumentTitle();
|
||||
return title.trim();
|
||||
}
|
||||
var saveSvgAction = svgEditor.curConfig.extPath + 'savefile.php';
|
||||
svgEditor.setCustomHandlers({
|
||||
save: function save(win, data) {
|
||||
var svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,
|
||||
filename = getFileNameFromTitle();
|
||||
|
||||
$.post(saveSvgAction, { output_svg: svg, filename: filename });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return extPhp_savefile;
|
||||
|
||||
}());
|
|
@ -0,0 +1,331 @@
|
|||
var svgEditorExtension_polygon = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-polygon.js
|
||||
*
|
||||
*
|
||||
* @copyright 2010 CloudCanvas, Inc. All rights reserved
|
||||
*
|
||||
*/
|
||||
var extPolygon = {
|
||||
name: 'polygon',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(S) {
|
||||
var svgEditor, $, svgCanvas, importLocale, editingitex, strings, selElems, started, newFO, showPanel, setAttr, cot, sec, buttons, contextTools;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
sec = function sec(n) {
|
||||
return 1 / Math.cos(n);
|
||||
};
|
||||
|
||||
cot = function cot(n) {
|
||||
return 1 / Math.tan(n);
|
||||
};
|
||||
|
||||
setAttr = function setAttr(attr, val) {
|
||||
svgCanvas.changeSelectedAttribute(attr, val);
|
||||
svgCanvas.call('changed', selElems);
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
var fcRules = $('#fc_rules');
|
||||
if (!fcRules.length) {
|
||||
fcRules = $('<style id="fc_rules"></style>').appendTo('head');
|
||||
}
|
||||
fcRules.text(!on ? '' : ' #tool_topath { display: none !important; }');
|
||||
$('#polygon_panel').toggle(on);
|
||||
};
|
||||
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
importLocale = S.importLocale, editingitex = false;
|
||||
_context.next = 10;
|
||||
return importLocale();
|
||||
|
||||
case 10:
|
||||
strings = _context.sent;
|
||||
selElems = void 0, started = void 0, newFO = void 0;
|
||||
|
||||
// const ccZoom;
|
||||
// const wEl, hEl;
|
||||
// const wOffset, hOffset;
|
||||
// const ccRBG;
|
||||
// const ccOpacity;
|
||||
// const brushW, brushH;
|
||||
|
||||
// const ccDebug = document.getElementById('debugpanel');
|
||||
|
||||
/* const properlySourceSizeTextArea = function(){
|
||||
// TODO: remove magic numbers here and get values from CSS
|
||||
const height = $('#svg_source_container').height() - 80;
|
||||
$('#svg_source_textarea').css('height', height);
|
||||
}; */
|
||||
|
||||
|
||||
/*
|
||||
function toggleSourceButtons(on){
|
||||
$('#tool_source_save, #tool_source_cancel').toggle(!on);
|
||||
$('#polygon_save, #polygon_cancel').toggle(on);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Obtained from http://code.google.com/p/passenger-top/source/browse/instiki/public/svg-edit/editor/extensions/ext-itex.js?r=3
|
||||
* This function sets the content of of the currently-selected foreignObject element,
|
||||
* based on the itex contained in string.
|
||||
* @param {string} tex The itex text.
|
||||
* @returns {boolean} This function returns false if the set was unsuccessful, true otherwise.
|
||||
*/
|
||||
/*
|
||||
function setItexString(tex) {
|
||||
const mathns = 'http://www.w3.org/1998/Math/MathML',
|
||||
xmlnsns = 'http://www.w3.org/2000/xmlns/',
|
||||
ajaxEndpoint = '../../itex';
|
||||
const elt = selElems[0];
|
||||
try {
|
||||
const math = svgdoc.createElementNS(mathns, 'math');
|
||||
math.setAttributeNS(xmlnsns, 'xmlns', mathns);
|
||||
math.setAttribute('display', 'inline');
|
||||
const semantics = document.createElementNS(mathns, 'semantics');
|
||||
const annotation = document.createElementNS(mathns, 'annotation');
|
||||
annotation.setAttribute('encoding', 'application/x-tex');
|
||||
annotation.textContent = tex;
|
||||
const mrow = document.createElementNS(mathns, 'mrow');
|
||||
semantics.append(mrow, annotation);
|
||||
math.append(semantics);
|
||||
// make an AJAX request to the server, to get the MathML
|
||||
$.post(ajaxEndpoint, {tex, display: 'inline'}, function(data){
|
||||
const children = data.documentElement.childNodes;
|
||||
while (children.length > 0) {
|
||||
mrow.append(svgdoc.adoptNode(children[0], true));
|
||||
}
|
||||
svgCanvas.sanitizeSvg(math);
|
||||
svgCanvas.call('changed', [elt]);
|
||||
});
|
||||
elt.firstChild.replaceWith(math);
|
||||
svgCanvas.call('changed', [elt]);
|
||||
svgCanvas.clearSelection();
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
buttons = [{
|
||||
id: 'tool_polygon',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'polygon.png',
|
||||
type: 'mode',
|
||||
position: 11,
|
||||
events: {
|
||||
click: function click() {
|
||||
svgCanvas.setMode('polygon');
|
||||
showPanel(true);
|
||||
}
|
||||
}
|
||||
}];
|
||||
contextTools = [{
|
||||
type: 'input',
|
||||
panel: 'polygon_panel',
|
||||
id: 'polySides',
|
||||
size: 3,
|
||||
defval: 5,
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('sides', this.value);
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'polygon-icons.svg',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
context_tools: strings.contextTools.map(function (contextTool, i) {
|
||||
return Object.assign(contextTools[i], contextTool);
|
||||
}),
|
||||
|
||||
callback: function callback() {
|
||||
$('#polygon_panel').hide();
|
||||
|
||||
// TODO: Needs to be done after orig icon loads
|
||||
setTimeout(function () {
|
||||
// Create source save/cancel buttons
|
||||
/* const save = */$('#tool_source_save').clone().hide().attr('id', 'polygon_save').unbind().appendTo('#tool_source_back').click(function () {
|
||||
if (!editingitex) {
|
||||
return;
|
||||
}
|
||||
// }
|
||||
// setSelectMode();
|
||||
});
|
||||
|
||||
/* const cancel = */$('#tool_source_cancel').clone().hide().attr('id', 'polygon_cancel').unbind().appendTo('#tool_source_back').click(function () {
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
mouseDown: function mouseDown(opts) {
|
||||
// const e = opts.event;
|
||||
var rgb = svgCanvas.getColor('fill');
|
||||
// const ccRgbEl = rgb.substring(1, rgb.length);
|
||||
var sRgb = svgCanvas.getColor('stroke');
|
||||
// ccSRgbEl = sRgb.substring(1, rgb.length);
|
||||
var sWidth = svgCanvas.getStrokeWidth();
|
||||
|
||||
if (svgCanvas.getMode() === 'polygon') {
|
||||
started = true;
|
||||
|
||||
newFO = svgCanvas.addSVGElementFromJson({
|
||||
element: 'polygon',
|
||||
attr: {
|
||||
cx: opts.start_x,
|
||||
cy: opts.start_y,
|
||||
id: svgCanvas.getNextId(),
|
||||
shape: 'regularPoly',
|
||||
sides: document.getElementById('polySides').value,
|
||||
orient: 'x',
|
||||
edge: 0,
|
||||
fill: rgb,
|
||||
strokecolor: sRgb,
|
||||
strokeWidth: sWidth
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
},
|
||||
mouseMove: function mouseMove(opts) {
|
||||
if (!started) {
|
||||
return;
|
||||
}
|
||||
if (svgCanvas.getMode() === 'polygon') {
|
||||
// const e = opts.event;
|
||||
var c = $(newFO).attr(['cx', 'cy', 'sides', 'orient', 'fill', 'strokecolor', 'strokeWidth']);
|
||||
var x = opts.mouse_x;
|
||||
var y = opts.mouse_y;
|
||||
var cx = c.cx,
|
||||
cy = c.cy,
|
||||
fill = c.fill,
|
||||
strokecolor = c.strokecolor,
|
||||
strokeWidth = c.strokeWidth,
|
||||
sides = c.sides,
|
||||
edg = Math.sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy)) / 1.5;
|
||||
|
||||
newFO.setAttributeNS(null, 'edge', edg);
|
||||
|
||||
var inradius = edg / 2 * cot(Math.PI / sides);
|
||||
var circumradius = inradius * sec(Math.PI / sides);
|
||||
var points = '';
|
||||
for (var s = 0; sides >= s; s++) {
|
||||
var angle = 2.0 * Math.PI * s / sides;
|
||||
x = circumradius * Math.cos(angle) + cx;
|
||||
y = circumradius * Math.sin(angle) + cy;
|
||||
|
||||
points += x + ',' + y + ' ';
|
||||
}
|
||||
|
||||
// const poly = newFO.createElementNS(NS.SVG, 'polygon');
|
||||
newFO.setAttributeNS(null, 'points', points);
|
||||
newFO.setAttributeNS(null, 'fill', fill);
|
||||
newFO.setAttributeNS(null, 'stroke', strokecolor);
|
||||
newFO.setAttributeNS(null, 'stroke-width', strokeWidth);
|
||||
// newFO.setAttributeNS(null, 'transform', 'rotate(-90)');
|
||||
// const shape = newFO.getAttributeNS(null, 'shape');
|
||||
// newFO.append(poly);
|
||||
// DrawPoly(cx, cy, sides, edg, orient);
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp(opts) {
|
||||
if (svgCanvas.getMode() === 'polygon') {
|
||||
var attrs = $(newFO).attr('edge');
|
||||
var keep = attrs.edge !== '0';
|
||||
// svgCanvas.addToSelection([newFO], true);
|
||||
return {
|
||||
keep: keep,
|
||||
element: newFO
|
||||
};
|
||||
}
|
||||
},
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// Use this to update the current selected elements
|
||||
selElems = opts.elems;
|
||||
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && elem.getAttributeNS(null, 'shape') === 'regularPoly') {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
$('#polySides').val(elem.getAttribute('sides'));
|
||||
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
// const elem = opts.elems[0];
|
||||
}
|
||||
});
|
||||
|
||||
case 15:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extPolygon;
|
||||
|
||||
}());
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,395 @@
|
|||
var svgEditorExtension_shapes = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-shapes.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Christian Tzurcanu, 2010 Alexis Deveria
|
||||
*
|
||||
*/
|
||||
var extShapes = {
|
||||
name: 'shapes',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, $, canv, svgroot, lastBBox, categories, library, modeId, startClientPos, currentD, curShapeId, curShape, startX, startY, curLib, loadIcons, makeButtons, loadLibrary, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
loadLibrary = function loadLibrary(catId) {
|
||||
var lib = library[catId];
|
||||
|
||||
if (!lib) {
|
||||
$('#shape_buttons').html(strings.loading);
|
||||
$.getJSON(svgEditor.curConfig.extIconsPath + 'shapelib/' + catId + '.json', function (result) {
|
||||
curLib = library[catId] = {
|
||||
data: result.data,
|
||||
size: result.size,
|
||||
fill: result.fill
|
||||
};
|
||||
makeButtons(catId, result);
|
||||
loadIcons();
|
||||
});
|
||||
return;
|
||||
}
|
||||
curLib = lib;
|
||||
if (!lib.buttons.length) {
|
||||
makeButtons(catId, lib);
|
||||
}
|
||||
loadIcons();
|
||||
};
|
||||
|
||||
makeButtons = function makeButtons(cat, shapes) {
|
||||
var size = curLib.size || 300;
|
||||
var fill = curLib.fill || false;
|
||||
var off = size * 0.05;
|
||||
var vb = [-off, -off, size + off * 2, size + off * 2].join(' ');
|
||||
var stroke = fill ? 0 : size / 30;
|
||||
var shapeIcon = 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>', 'text/xml');
|
||||
|
||||
var width = 24;
|
||||
var height = 24;
|
||||
shapeIcon.documentElement.setAttribute('width', width);
|
||||
shapeIcon.documentElement.setAttribute('height', height);
|
||||
var svgElem = $(document.importNode(shapeIcon.documentElement, true));
|
||||
|
||||
var data = shapes.data;
|
||||
|
||||
|
||||
curLib.buttons = [];
|
||||
for (var id in data) {
|
||||
var pathD = data[id];
|
||||
var icon = svgElem.clone();
|
||||
icon.find('path').attr('d', pathD);
|
||||
|
||||
var iconBtn = icon.wrap('<div class="tool_button">').parent().attr({
|
||||
id: modeId + '_' + id,
|
||||
title: id
|
||||
});
|
||||
// Store for later use
|
||||
curLib.buttons.push(iconBtn[0]);
|
||||
}
|
||||
};
|
||||
|
||||
loadIcons = function loadIcons() {
|
||||
$('#shape_buttons').empty().append(curLib.buttons);
|
||||
};
|
||||
|
||||
_context.next = 5;
|
||||
return importLocale();
|
||||
|
||||
case 5:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
canv = svgEditor.canvas;
|
||||
svgroot = canv.getRootElem();
|
||||
lastBBox = {};
|
||||
|
||||
// This populates the category list
|
||||
|
||||
categories = strings.categories;
|
||||
library = {
|
||||
basic: {
|
||||
data: {
|
||||
heart: 'm150,73c61,-175 300,0 0,225c-300,-225 -61,-400 0,-225z',
|
||||
frame: 'm0,0l300,0l0,300l-300,0zm35,-265l0,230l230,0l0,-230z',
|
||||
donut: 'm1,150l0,0c0,-82.29042 66.70958,-149 149,-149l0,0c39.51724,0 77.41599,15.69816 105.35889,43.64108c27.94293,27.94293 43.64111,65.84165 43.64111,105.35892l0,0c0,82.29041 -66.70958,149 -149,149l0,0c-82.29041,0 -149,-66.70959 -149,-149zm74.5,0l0,0c0,41.1452 33.35481,74.5 74.5,74.5c41.14522,0 74.5,-33.3548 74.5,-74.5c0,-41.1452 -33.3548,-74.5 -74.5,-74.5l0,0c-41.14519,0 -74.5,33.35481 -74.5,74.5z',
|
||||
triangle: 'm1,280.375l149,-260.75l149,260.75z',
|
||||
right_triangle: 'm1,299l0,-298l298,298z',
|
||||
diamond: 'm1,150l149,-149l149,149l-149,149l-149,-149z',
|
||||
pentagon: 'm1.00035,116.97758l148.99963,-108.4053l148.99998,108.4053l-56.91267,175.4042l-184.1741,0l-56.91284,-175.4042z',
|
||||
hexagon: 'm1,149.99944l63.85715,-127.71428l170.28572,0l63.85713,127.71428l-63.85713,127.71428l-170.28572,0l-63.85715,-127.71428z',
|
||||
septagon1: 'm0.99917,191.06511l29.51249,-127.7108l119.48833,-56.83673l119.48836,56.83673l29.51303,127.7108l-82.69087,102.41679l-132.62103,0l-82.69031,-102.41679z',
|
||||
heptagon: 'm1,88.28171l87.28172,-87.28171l123.43653,0l87.28172,87.28171l0,123.43654l-87.28172,87.28172l-123.43653,0l-87.28172,-87.28172l0,-123.43654z',
|
||||
decagon: 'm1,150.00093l28.45646,-88.40318l74.49956,-54.63682l92.08794,0l74.50002,54.63682l28.45599,88.40318l-28.45599,88.40318l-74.50002,54.63681l-92.08794,0l-74.49956,-54.63681l-28.45646,-88.40318z',
|
||||
dodecagon: 'm1,110.07421l39.92579,-69.14842l69.14842,-39.92579l79.85159,0l69.14842,39.92579l39.92578,69.14842l0,79.85159l-39.92578,69.14842l-69.14842,39.92578l-79.85159,0l-69.14842,-39.92578l-39.92579,-69.14842l0,-79.85159z',
|
||||
star_points_5: 'm1,116.58409l113.82668,0l35.17332,-108.13487l35.17334,108.13487l113.82666,0l-92.08755,66.83026l35.17514,108.13487l-92.08759,-66.83208l-92.08757,66.83208l35.17515,-108.13487l-92.08758,-66.83026z',
|
||||
trapezoid: 'm1,299l55.875,-298l186.25001,0l55.87498,298z',
|
||||
arrow_up: 'm1.49805,149.64304l148.50121,-148.00241l148.50121,148.00241l-74.25061,0l0,148.71457l-148.5012,0l0,-148.71457z',
|
||||
vertical_scrool: 'm37.375,261.625l0,-242.9375l0,0c0,-10.32083 8.36669,-18.6875 18.6875,-18.6875l224.25,0c10.32083,0 18.6875,8.36667 18.6875,18.6875c0,10.32081 -8.36667,18.6875 -18.6875,18.6875l-18.6875,0l0,242.9375c0,10.32083 -8.36668,18.6875 -18.6875,18.6875l-224.25,0l0,0c-10.32083,0 -18.6875,-8.36667 -18.6875,-18.6875c0,-10.32083 8.36667,-18.6875 18.6875,-18.6875zm37.375,-261.625l0,0c10.32081,0 18.6875,8.36667 18.6875,18.6875c0,10.32081 -8.36669,18.6875 -18.6875,18.6875c-5.1604,0 -9.34375,-4.18335 -9.34375,-9.34375c0,-5.16041 4.18335,-9.34375 9.34375,-9.34375l18.6875,0m186.875,18.6875l-205.5625,0m-37.375,224.25l0,0c5.1604,0 9.34375,4.18335 9.34375,9.34375c0,5.1604 -4.18335,9.34375 -9.34375,9.34375l18.6875,0m-18.6875,18.6875l0,0c10.32081,0 18.6875,-8.36667 18.6875,-18.6875l0,-18.6875',
|
||||
smiley: 'm68.49886,214.78838q81.06408,55.67332 161.93891,0m-144.36983,-109.9558c0,-8.60432 6.97517,-15.57949 15.57948,-15.57949c8.60431,0 15.57948,6.97517 15.57948,15.57949c0,8.60431 -6.97517,15.57947 -15.57948,15.57947c-8.60431,0 -15.57948,-6.97516 -15.57948,-15.57947m95.83109,0c0,-8.60432 6.97517,-15.57949 15.57948,-15.57949c8.60431,0 15.57947,6.97517 15.57947,15.57949c0,8.60431 -6.97516,15.57947 -15.57947,15.57947c-8.60429,0 -15.57948,-6.97516 -15.57948,-15.57947m-181.89903,44.73038l0,0c0,-82.60133 66.96162,-149.56296 149.56296,-149.56296c82.60135,0 149.56296,66.96162 149.56296,149.56296c0,82.60135 -66.96161,149.56296 -149.56296,149.56296c-82.60133,0 -149.56296,-66.96161 -149.56296,-149.56296zm0,0l0,0c0,-82.60133 66.96162,-149.56296 149.56296,-149.56296c82.60135,0 149.56296,66.96162 149.56296,149.56296c0,82.60135 -66.96161,149.56296 -149.56296,149.56296c-82.60133,0 -149.56296,-66.96161 -149.56296,-149.56296z',
|
||||
left_braket: 'm174.24565,298.5c-13.39009,0 -24.24489,-1.80908 -24.24489,-4.04065l0,-140.4187c0,-2.23158 -10.85481,-4.04065 -24.2449,-4.04065l0,0c13.39009,0 24.2449,-1.80907 24.2449,-4.04065l0,-140.4187l0,0c0,-2.23159 10.8548,-4.04066 24.24489,-4.04066',
|
||||
uml_actor: 'm40.5,100l219,0m-108.99991,94.00006l107,105m-107.00009,-106.00006l-100,106m99.5,-231l0,125m33.24219,-158.75781c0,18.35916 -14.88303,33.24219 -33.24219,33.24219c-18.35916,0 -33.2422,-14.88303 -33.2422,-33.24219c0.00002,-18.35915 14.88304,-33.24219 33.2422,-33.24219c18.35916,0 33.24219,14.88304 33.24219,33.24219z',
|
||||
dialog_balloon_1: 'm0.99786,35.96579l0,0c0,-19.31077 15.28761,-34.96524 34.14583,-34.96524l15.52084,0l0,0l74.50001,0l139.68748,0c9.05606,0 17.74118,3.68382 24.14478,10.24108c6.40356,6.55726 10.00107,15.45081 10.00107,24.72416l0,87.41311l0,0l0,52.44785l0,0c0,19.31078 -15.2876,34.96524 -34.14584,34.96524l-139.68748,0l-97.32507,88.90848l22.82506,-88.90848l-15.52084,0c-18.85822,0 -34.14583,-15.65446 -34.14583,-34.96524l0,0l0,-52.44785l0,0z',
|
||||
cloud: 'm182.05086,34.31005c-0.64743,0.02048 -1.27309,0.07504 -1.92319,0.13979c-10.40161,1.03605 -19.58215,7.63722 -24.24597,17.4734l-2.47269,7.44367c0.53346,-2.57959 1.35258,-5.08134 2.47269,-7.44367c-8.31731,-8.61741 -19.99149,-12.59487 -31.52664,-10.72866c-11.53516,1.8662 -21.55294,9.3505 -27.02773,20.19925c-15.45544,-9.51897 -34.72095,-8.94245 -49.62526,1.50272c-14.90431,10.44516 -22.84828,28.93916 -20.43393,47.59753l1.57977,7.58346c-0.71388,-2.48442 -1.24701,-5.01186 -1.57977,-7.58346l-0.2404,0.69894c-12.95573,1.4119 -23.58103,11.46413 -26.34088,24.91708c-2.75985,13.45294 2.9789,27.25658 14.21789,34.21291l17.54914,4.26352c-6.1277,0.50439 -12.24542,-0.9808 -17.54914,-4.26352c-8.66903,9.71078 -10.6639,24.08736 -4.94535,35.96027c5.71854,11.87289 17.93128,18.70935 30.53069,17.15887l7.65843,-2.02692c-2.46413,1.0314 -5.02329,1.70264 -7.65843,2.02692c7.15259,13.16728 19.01251,22.77237 32.93468,26.5945c13.92217,3.82214 28.70987,1.56322 41.03957,-6.25546c10.05858,15.86252 27.91113,24.19412 45.81322,21.38742c17.90208,-2.8067 32.66954,-16.26563 37.91438,-34.52742l1.82016,-10.20447c-0.27254,3.46677 -0.86394,6.87508 -1.82016,10.20447c12.31329,8.07489 27.80199,8.52994 40.52443,1.18819c12.72244,-7.34175 20.6609,-21.34155 20.77736,-36.58929l-4.56108,-22.7823l-17.96776,-15.41455c13.89359,8.70317 22.6528,21.96329 22.52884,38.19685c16.5202,0.17313 30.55292,-13.98268 36.84976,-30.22897c6.29684,-16.24631 3.91486,-34.76801 -6.2504,-48.68089c4.21637,-10.35873 3.96622,-22.14172 -0.68683,-32.29084c-4.65308,-10.14912 -13.23602,-17.69244 -23.55914,-20.65356c-2.31018,-13.45141 -11.83276,-24.27162 -24.41768,-27.81765c-12.58492,-3.54603 -25.98557,0.82654 -34.41142,11.25287l-5.11707,8.63186c1.30753,-3.12148 3.01521,-6.03101 5.11707,-8.63186c-5.93959,-8.19432 -15.2556,-12.8181 -24.96718,-12.51096z',
|
||||
cylinder: 'm299.0007,83.77844c0,18.28676 -66.70958,33.11111 -149.00002,33.11111m149.00002,-33.11111l0,0c0,18.28676 -66.70958,33.11111 -149.00002,33.11111c-82.29041,0 -148.99997,-14.82432 -148.99997,-33.11111m0,0l0,0c0,-18.28674 66.70956,-33.1111 148.99997,-33.1111c82.29044,0 149.00002,14.82436 149.00002,33.1111l0,132.44449c0,18.28674 -66.70958,33.11105 -149.00002,33.11105c-82.29041,0 -148.99997,-14.82431 -148.99997,-33.11105z',
|
||||
arrow_u_turn: 'm1.00059,299.00055l0,-167.62497l0,0c0,-72.00411 58.37087,-130.37499 130.375,-130.37499l0,0l0,0c34.57759,0 67.73898,13.7359 92.18906,38.18595c24.45006,24.45005 38.18593,57.61144 38.18593,92.18904l0,18.625l37.24997,0l-74.49995,74.50002l-74.50002,-74.50002l37.25,0l0,-18.625c0,-30.8589 -25.0161,-55.87498 -55.87498,-55.87498l0,0l0,0c-30.85892,0 -55.875,25.01608 -55.875,55.87498l0,167.62497z',
|
||||
arrow_left_up: 'm0.99865,224.5l74.50004,-74.5l0,37.25l111.74991,0l0,-111.75l-37.25,0l74.5,-74.5l74.5,74.5l-37.25,0l0,186.25l-186.24989,0l0,37.25l-74.50005,-74.5z',
|
||||
maximize: 'm1.00037,150.34581l55.30305,-55.30267l0,27.65093l22.17356,0l0,-44.21833l44.21825,0l0,-22.17357l-27.65095,0l55.30267,-55.30292l55.3035,55.30292l-27.65175,0l0,22.17357l44.21835,0l0,44.21833l22.17357,0l0,-27.65093l55.30345,55.30267l-55.30345,55.3035l0,-27.65175l-22.17357,0l0,44.21834l-44.21835,0l0,22.17355l27.65175,0l-55.3035,55.30348l-55.30267,-55.30348l27.65095,0l0,-22.17355l-44.21825,0l0,-44.21834l-22.17356,0l0,27.65175l-55.30305,-55.3035z',
|
||||
cross: 'm0.99844,99.71339l98.71494,0l0,-98.71495l101.26279,0l0,98.71495l98.71495,0l0,101.2628l-98.71495,0l0,98.71494l-101.26279,0l0,-98.71494l-98.71494,0z',
|
||||
plaque: 'm-0.00197,49.94376l0,0c27.5829,0 49.94327,-22.36036 49.94327,-49.94327l199.76709,0l0,0c0,27.5829 22.36037,49.94327 49.94325,49.94327l0,199.7671l0,0c-27.58289,0 -49.94325,22.36034 -49.94325,49.94325l-199.76709,0c0,-27.58292 -22.36037,-49.94325 -49.94327,-49.94325z',
|
||||
page: 'm249.3298,298.99744l9.9335,-39.73413l39.73413,-9.93355l-49.66763,49.66768l-248.33237,0l0,-298.00001l298.00001,0l0,248.33234'
|
||||
|
||||
},
|
||||
buttons: []
|
||||
}
|
||||
};
|
||||
modeId = 'shapelib';
|
||||
startClientPos = {};
|
||||
currentD = void 0, curShapeId = void 0, curShape = void 0, startX = void 0, startY = void 0;
|
||||
curLib = library.basic;
|
||||
buttons = [{
|
||||
id: 'tool_shapelib',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'shapes.png',
|
||||
type: 'mode_flyout', // _flyout
|
||||
position: 6,
|
||||
events: {
|
||||
click: function click() {
|
||||
canv.setMode(modeId);
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'ext-shapes.xml',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('<style>').text('#shape_buttons {' + 'overflow: auto;' + 'width: 180px;' + 'max-height: 300px;' + 'display: table-cell;' + 'vertical-align: middle;' + '}' + '#shape_cats {' + 'min-width: 110px;' + 'display: table-cell;' + 'vertical-align: middle;' + 'height: 300px;' + '}' + '#shape_cats > div {' + 'line-height: 1em;' + 'padding: .5em;' + 'border:1px solid #B0B0B0;' + 'background: #E8E8E8;' + 'margin-bottom: -1px;' + '}' + '#shape_cats div:hover {' + 'background: #FFFFCC;' + '}' + '#shape_cats div.current {' + 'font-weight: bold;' + '}').appendTo('head');
|
||||
|
||||
var btnDiv = $('<div id="shape_buttons">');
|
||||
$('#tools_shapelib > *').wrapAll(btnDiv);
|
||||
|
||||
var shower = $('#tools_shapelib_show');
|
||||
|
||||
loadLibrary('basic');
|
||||
|
||||
// Do mouseup on parent element rather than each button
|
||||
$('#shape_buttons').mouseup(function (evt) {
|
||||
var btn = $(evt.target).closest('div.tool_button');
|
||||
|
||||
if (!btn.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var copy = btn.children().clone();
|
||||
shower.children(':not(.flyout_arrow_horiz)').remove();
|
||||
shower.append(copy).attr('data-curopt', '#' + btn[0].id) // This sets the current mode
|
||||
.mouseup();
|
||||
canv.setMode(modeId);
|
||||
|
||||
curShapeId = btn[0].id.substr((modeId + '_').length);
|
||||
currentD = curLib.data[curShapeId];
|
||||
|
||||
$('.tools_flyout').fadeOut();
|
||||
});
|
||||
|
||||
var shapeCats = $('<div id="shape_cats">');
|
||||
|
||||
var catStr = '';
|
||||
$.each(categories, function (id, label) {
|
||||
catStr += '<div data-cat=' + id + '>' + label + '</div>';
|
||||
});
|
||||
|
||||
shapeCats.html(catStr).children().bind('mouseup', function () {
|
||||
var catlink = $(this);
|
||||
catlink.siblings().removeClass('current');
|
||||
catlink.addClass('current');
|
||||
|
||||
loadLibrary(catlink.attr('data-cat'));
|
||||
// Get stuff
|
||||
return false;
|
||||
});
|
||||
|
||||
shapeCats.children().eq(0).addClass('current');
|
||||
|
||||
$('#tools_shapelib').append(shapeCats);
|
||||
|
||||
shower.mouseup(function () {
|
||||
canv.setMode(currentD ? modeId : 'select');
|
||||
});
|
||||
$('#tool_shapelib').remove();
|
||||
|
||||
var h = $('#tools_shapelib').height();
|
||||
$('#tools_shapelib').css({
|
||||
'margin-top': -(h / 2 - 15),
|
||||
'margin-left': 3
|
||||
});
|
||||
// Now add shape categories from locale
|
||||
var cats = {};
|
||||
for (var o in categories) {
|
||||
cats['#shape_cats [data-cat="' + o + '"]'] = categories[o];
|
||||
}
|
||||
this.setStrings('content', cats);
|
||||
},
|
||||
mouseDown: function mouseDown(opts) {
|
||||
var mode = canv.getMode();
|
||||
if (mode !== modeId) {
|
||||
return;
|
||||
}
|
||||
|
||||
startX = opts.start_x;
|
||||
var x = startX;
|
||||
startY = opts.start_y;
|
||||
var y = startY;
|
||||
var curStyle = canv.getStyle();
|
||||
|
||||
startClientPos.x = opts.event.clientX;
|
||||
startClientPos.y = opts.event.clientY;
|
||||
|
||||
curShape = canv.addSVGElementFromJson({
|
||||
element: 'path',
|
||||
curStyles: true,
|
||||
attr: {
|
||||
d: currentD,
|
||||
id: canv.getNextId(),
|
||||
opacity: curStyle.opacity / 2,
|
||||
style: 'pointer-events:none'
|
||||
}
|
||||
});
|
||||
|
||||
// Make sure shape uses absolute values
|
||||
if (/[a-z]/.test(currentD)) {
|
||||
currentD = curLib.data[curShapeId] = canv.pathActions.convertPath(curShape);
|
||||
curShape.setAttribute('d', currentD);
|
||||
canv.pathActions.fixEnd(curShape);
|
||||
}
|
||||
curShape.setAttribute('transform', 'translate(' + x + ',' + y + ') scale(0.005) translate(' + -x + ',' + -y + ')');
|
||||
|
||||
canv.recalculateDimensions(curShape);
|
||||
|
||||
/* const tlist = */canv.getTransformList(curShape);
|
||||
|
||||
lastBBox = curShape.getBBox();
|
||||
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
},
|
||||
mouseMove: function mouseMove(opts) {
|
||||
var mode = canv.getMode();
|
||||
if (mode !== modeId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var zoom = canv.getZoom();
|
||||
var evt = opts.event;
|
||||
|
||||
var x = opts.mouse_x / zoom;
|
||||
var y = opts.mouse_y / zoom;
|
||||
|
||||
var tlist = canv.getTransformList(curShape),
|
||||
box = curShape.getBBox(),
|
||||
left = box.x,
|
||||
top = box.y;
|
||||
// {width, height} = box,
|
||||
// const dx = (x - startX), dy = (y - startY);
|
||||
|
||||
var newbox = {
|
||||
x: Math.min(startX, x),
|
||||
y: Math.min(startY, y),
|
||||
width: Math.abs(x - startX),
|
||||
height: Math.abs(y - startY)
|
||||
};
|
||||
|
||||
/*
|
||||
// This is currently serving no purpose, so commenting out
|
||||
let sy = height ? (height + dy) / height : 1,
|
||||
sx = width ? (width + dx) / width : 1;
|
||||
*/
|
||||
|
||||
var sx = newbox.width / lastBBox.width || 1;
|
||||
var sy = newbox.height / lastBBox.height || 1;
|
||||
|
||||
// Not perfect, but mostly works...
|
||||
var tx = 0;
|
||||
if (x < startX) {
|
||||
tx = lastBBox.width;
|
||||
}
|
||||
var ty = 0;
|
||||
if (y < startY) {
|
||||
ty = lastBBox.height;
|
||||
}
|
||||
|
||||
// update the transform list with translate,scale,translate
|
||||
var translateOrigin = svgroot.createSVGTransform(),
|
||||
scale = svgroot.createSVGTransform(),
|
||||
translateBack = svgroot.createSVGTransform();
|
||||
|
||||
translateOrigin.setTranslate(-(left + tx), -(top + ty));
|
||||
if (!evt.shiftKey) {
|
||||
var max = Math.min(Math.abs(sx), Math.abs(sy));
|
||||
|
||||
sx = max * (sx < 0 ? -1 : 1);
|
||||
sy = max * (sy < 0 ? -1 : 1);
|
||||
}
|
||||
scale.setScale(sx, sy);
|
||||
|
||||
translateBack.setTranslate(left + tx, top + ty);
|
||||
tlist.appendItem(translateBack);
|
||||
tlist.appendItem(scale);
|
||||
tlist.appendItem(translateOrigin);
|
||||
|
||||
canv.recalculateDimensions(curShape);
|
||||
|
||||
lastBBox = curShape.getBBox();
|
||||
},
|
||||
mouseUp: function mouseUp(opts) {
|
||||
var mode = canv.getMode();
|
||||
if (mode !== modeId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var keepObject = opts.event.clientX !== startClientPos.x && opts.event.clientY !== startClientPos.y;
|
||||
|
||||
return {
|
||||
keep: keepObject,
|
||||
element: curShape,
|
||||
started: false
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
case 19:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extShapes;
|
||||
|
||||
}());
|
|
@ -0,0 +1,293 @@
|
|||
var svgEditorExtension_star = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-star.js
|
||||
*
|
||||
*
|
||||
* @copyright 2010 CloudCanvas, Inc. All rights reserved
|
||||
*
|
||||
*/
|
||||
var extStar = {
|
||||
name: 'star',
|
||||
init: function () {
|
||||
var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(S) {
|
||||
var svgEditor, $, svgCanvas, importLocale, selElems, started, newFO, strings, showPanel, setAttr, buttons, contextTools;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
setAttr = function setAttr(attr, val) {
|
||||
svgCanvas.changeSelectedAttribute(attr, val);
|
||||
svgCanvas.call('changed', selElems);
|
||||
};
|
||||
|
||||
showPanel = function showPanel(on) {
|
||||
var fcRules = $('#fc_rules');
|
||||
if (!fcRules.length) {
|
||||
fcRules = $('<style id="fc_rules"></style>').appendTo('head');
|
||||
}
|
||||
fcRules.text(!on ? '' : ' #tool_topath { display: none !important; }');
|
||||
$('#star_panel').toggle(on);
|
||||
};
|
||||
|
||||
svgEditor = this;
|
||||
$ = jQuery;
|
||||
svgCanvas = svgEditor.canvas;
|
||||
importLocale = S.importLocale; // {svgcontent},
|
||||
|
||||
selElems = void 0, started = void 0, newFO = void 0;
|
||||
// edg = 0,
|
||||
// newFOG, newFOGParent, newDef, newImageName, newMaskID,
|
||||
// undoCommand = 'Not image',
|
||||
// modeChangeG, ccZoom, wEl, hEl, wOffset, hOffset, ccRgbEl, brushW, brushH;
|
||||
|
||||
_context.next = 9;
|
||||
return importLocale();
|
||||
|
||||
case 9:
|
||||
strings = _context.sent;
|
||||
|
||||
|
||||
/*
|
||||
function cot(n){
|
||||
return 1 / Math.tan(n);
|
||||
}
|
||||
function sec(n){
|
||||
return 1 / Math.cos(n);
|
||||
}
|
||||
*/
|
||||
buttons = [{
|
||||
id: 'tool_star',
|
||||
icon: svgEditor.curConfig.extIconsPath + 'star.png',
|
||||
type: 'mode',
|
||||
position: 12,
|
||||
events: {
|
||||
click: function click() {
|
||||
showPanel(true);
|
||||
svgCanvas.setMode('star');
|
||||
}
|
||||
}
|
||||
}];
|
||||
contextTools = [{
|
||||
type: 'input',
|
||||
panel: 'star_panel',
|
||||
id: 'starNumPoints',
|
||||
size: 3,
|
||||
defval: 5,
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('point', this.value);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'star_panel',
|
||||
id: 'starRadiusMulitplier',
|
||||
size: 3,
|
||||
defval: 2.5
|
||||
}, {
|
||||
type: 'input',
|
||||
panel: 'star_panel',
|
||||
id: 'radialShift',
|
||||
size: 3,
|
||||
defval: 0,
|
||||
events: {
|
||||
change: function change() {
|
||||
setAttr('radialshift', this.value);
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'star-icons.svg',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
}),
|
||||
context_tools: strings.contextTools.map(function (contextTool, i) {
|
||||
return Object.assign(contextTools[i], contextTool);
|
||||
}),
|
||||
callback: function callback() {
|
||||
$('#star_panel').hide();
|
||||
// const endChanges = function(){};
|
||||
},
|
||||
mouseDown: function mouseDown(opts) {
|
||||
var rgb = svgCanvas.getColor('fill');
|
||||
// const ccRgbEl = rgb.substring(1, rgb.length);
|
||||
var sRgb = svgCanvas.getColor('stroke');
|
||||
// const ccSRgbEl = sRgb.substring(1, rgb.length);
|
||||
var sWidth = svgCanvas.getStrokeWidth();
|
||||
|
||||
if (svgCanvas.getMode() === 'star') {
|
||||
started = true;
|
||||
|
||||
newFO = svgCanvas.addSVGElementFromJson({
|
||||
element: 'polygon',
|
||||
attr: {
|
||||
cx: opts.start_x,
|
||||
cy: opts.start_y,
|
||||
id: svgCanvas.getNextId(),
|
||||
shape: 'star',
|
||||
point: document.getElementById('starNumPoints').value,
|
||||
r: 0,
|
||||
radialshift: document.getElementById('radialShift').value,
|
||||
r2: 0,
|
||||
orient: 'point',
|
||||
fill: rgb,
|
||||
strokecolor: sRgb,
|
||||
strokeWidth: sWidth
|
||||
}
|
||||
});
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
},
|
||||
mouseMove: function mouseMove(opts) {
|
||||
if (!started) {
|
||||
return;
|
||||
}
|
||||
if (svgCanvas.getMode() === 'star') {
|
||||
var c = $(newFO).attr(['cx', 'cy', 'point', 'orient', 'fill', 'strokecolor', 'strokeWidth', 'radialshift']);
|
||||
|
||||
var x = opts.mouse_x;
|
||||
var y = opts.mouse_y;
|
||||
var cx = c.cx,
|
||||
cy = c.cy,
|
||||
fill = c.fill,
|
||||
strokecolor = c.strokecolor,
|
||||
strokeWidth = c.strokeWidth,
|
||||
radialshift = c.radialshift,
|
||||
point = c.point,
|
||||
orient = c.orient,
|
||||
circumradius = Math.sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy)) / 1.5,
|
||||
inradius = circumradius / document.getElementById('starRadiusMulitplier').value;
|
||||
|
||||
newFO.setAttributeNS(null, 'r', circumradius);
|
||||
newFO.setAttributeNS(null, 'r2', inradius);
|
||||
|
||||
var polyPoints = '';
|
||||
for (var s = 0; point >= s; s++) {
|
||||
var angle = 2.0 * Math.PI * (s / point);
|
||||
if (orient === 'point') {
|
||||
angle -= Math.PI / 2;
|
||||
} else if (orient === 'edge') {
|
||||
angle = angle + Math.PI / point - Math.PI / 2;
|
||||
}
|
||||
|
||||
x = circumradius * Math.cos(angle) + cx;
|
||||
y = circumradius * Math.sin(angle) + cy;
|
||||
|
||||
polyPoints += x + ',' + y + ' ';
|
||||
|
||||
if (inradius != null) {
|
||||
angle = 2.0 * Math.PI * (s / point) + Math.PI / point;
|
||||
if (orient === 'point') {
|
||||
angle -= Math.PI / 2;
|
||||
} else if (orient === 'edge') {
|
||||
angle = angle + Math.PI / point - Math.PI / 2;
|
||||
}
|
||||
angle += radialshift;
|
||||
|
||||
x = inradius * Math.cos(angle) + cx;
|
||||
y = inradius * Math.sin(angle) + cy;
|
||||
|
||||
polyPoints += x + ',' + y + ' ';
|
||||
}
|
||||
}
|
||||
newFO.setAttributeNS(null, 'points', polyPoints);
|
||||
newFO.setAttributeNS(null, 'fill', fill);
|
||||
newFO.setAttributeNS(null, 'stroke', strokecolor);
|
||||
newFO.setAttributeNS(null, 'stroke-width', strokeWidth);
|
||||
/* const shape = */newFO.getAttributeNS(null, 'shape');
|
||||
|
||||
return {
|
||||
started: true
|
||||
};
|
||||
}
|
||||
},
|
||||
mouseUp: function mouseUp() {
|
||||
if (svgCanvas.getMode() === 'star') {
|
||||
var attrs = $(newFO).attr(['r']);
|
||||
// svgCanvas.addToSelection([newFO], true);
|
||||
return {
|
||||
keep: attrs.r !== '0',
|
||||
element: newFO
|
||||
};
|
||||
}
|
||||
},
|
||||
selectedChanged: function selectedChanged(opts) {
|
||||
// Use this to update the current selected elements
|
||||
selElems = opts.elems;
|
||||
|
||||
var i = selElems.length;
|
||||
while (i--) {
|
||||
var elem = selElems[i];
|
||||
if (elem && elem.getAttributeNS(null, 'shape') === 'star') {
|
||||
if (opts.selectedElement && !opts.multiselected) {
|
||||
// $('#starRadiusMulitplier').val(elem.getAttribute('r2'));
|
||||
$('#starNumPoints').val(elem.getAttribute('point'));
|
||||
$('#radialShift').val(elem.getAttribute('radialshift'));
|
||||
showPanel(true);
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
} else {
|
||||
showPanel(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
// const elem = opts.elems[0];
|
||||
}
|
||||
});
|
||||
|
||||
case 13:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extStar;
|
||||
|
||||
}());
|
|
@ -0,0 +1,314 @@
|
|||
var svgEditorExtension_storage = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* ext-storage.js
|
||||
*
|
||||
* This extension allows automatic saving of the SVG canvas contents upon
|
||||
* page unload (which can later be automatically retrieved upon future
|
||||
* editor loads).
|
||||
*
|
||||
* The functionality was originally part of the SVG Editor, but moved to a
|
||||
* separate extension to make the setting behavior optional, and adapted
|
||||
* to inform the user of its setting of local data.
|
||||
* Dependencies:
|
||||
*
|
||||
* 1. jQuery BBQ (for deparam)
|
||||
* @license MIT
|
||||
*
|
||||
* @copyright 2010 Brett Zamir
|
||||
* @todo Revisit on whether to use $.pref over directly setting curConfig in all
|
||||
* extensions for a more public API (not only for extPath and imagePath,
|
||||
* but other currently used config in the extensions)
|
||||
* @todo We might provide control of storage settings through the UI besides the
|
||||
* initial (or URL-forced) dialog. *
|
||||
*/
|
||||
var extStorage = {
|
||||
name: 'storage',
|
||||
init: function init() {
|
||||
var svgEditor = this;
|
||||
var $ = jQuery;
|
||||
var svgCanvas = svgEditor.canvas;
|
||||
|
||||
// We could empty any already-set data for users when they decline storage,
|
||||
// but it would be a risk for users who wanted to store but accidentally
|
||||
// said "no"; instead, we'll let those who already set it, delete it themselves;
|
||||
// to change, set the "emptyStorageOnDecline" config setting to true
|
||||
// in svgedit-config-iife.js/svgedit-config-es.js.
|
||||
var _svgEditor$curConfig = svgEditor.curConfig,
|
||||
emptyStorageOnDecline = _svgEditor$curConfig.emptyStorageOnDecline,
|
||||
noStorageOnLoad = _svgEditor$curConfig.noStorageOnLoad,
|
||||
forceStorage = _svgEditor$curConfig.forceStorage;
|
||||
var storage = svgEditor.storage;
|
||||
|
||||
|
||||
function replaceStoragePrompt(val) {
|
||||
val = val ? 'storagePrompt=' + val : '';
|
||||
var loc = top.location; // Allow this to work with the embedded editor as well
|
||||
if (loc.href.includes('storagePrompt=')) {
|
||||
loc.href = loc.href.replace(/([&?])storagePrompt=[^&]*(&?)/, function (n0, n1, amp) {
|
||||
return (val ? n1 : '') + val + (!val && amp ? n1 : amp || '');
|
||||
});
|
||||
} else {
|
||||
loc.href += (loc.href.includes('?') ? '&' : '?') + val;
|
||||
}
|
||||
}
|
||||
function setSVGContentStorage(val) {
|
||||
if (storage) {
|
||||
var name = 'svgedit-' + svgEditor.curConfig.canvasName;
|
||||
if (!val) {
|
||||
storage.removeItem(name);
|
||||
} else {
|
||||
storage.setItem(name, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function expireCookie(cookie) {
|
||||
document.cookie = encodeURIComponent(cookie) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT';
|
||||
}
|
||||
|
||||
function removeStoragePrefCookie() {
|
||||
expireCookie('store');
|
||||
}
|
||||
|
||||
function emptyStorage() {
|
||||
setSVGContentStorage('');
|
||||
for (var name in svgEditor.curPrefs) {
|
||||
if (svgEditor.curPrefs.hasOwnProperty(name)) {
|
||||
name = 'svg-edit-' + name;
|
||||
if (storage) {
|
||||
storage.removeItem(name);
|
||||
}
|
||||
expireCookie(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// emptyStorage();
|
||||
|
||||
/**
|
||||
* Listen for unloading: If and only if opted in by the user, set the content
|
||||
* document and preferences into storage:
|
||||
* 1. Prevent save warnings (since we're automatically saving unsaved
|
||||
* content into storage)
|
||||
* 2. Use localStorage to set SVG contents (potentially too large to allow in cookies)
|
||||
* 3. Use localStorage (where available) or cookies to set preferences.
|
||||
*/
|
||||
function setupBeforeUnloadListener() {
|
||||
window.addEventListener('beforeunload', function (e) {
|
||||
// Don't save anything unless the user opted in to storage
|
||||
if (!document.cookie.match(/(?:^|;\s*)store=(?:prefsAndContent|prefsOnly)/)) {
|
||||
return;
|
||||
}
|
||||
if (document.cookie.match(/(?:^|;\s*)store=prefsAndContent/)) {
|
||||
setSVGContentStorage(svgCanvas.getSvgString());
|
||||
}
|
||||
|
||||
svgEditor.setConfig({ no_save_warning: true }); // No need for explicit saving at all once storage is on
|
||||
// svgEditor.showSaveWarning = false;
|
||||
|
||||
var curPrefs = svgEditor.curPrefs;
|
||||
|
||||
|
||||
for (var key in curPrefs) {
|
||||
if (curPrefs.hasOwnProperty(key)) {
|
||||
// It's our own config, so we don't need to iterate up the prototype chain
|
||||
var val = curPrefs[key];
|
||||
var store = val !== undefined;
|
||||
key = 'svg-edit-' + key;
|
||||
if (!store) {
|
||||
continue;
|
||||
}
|
||||
if (storage) {
|
||||
storage.setItem(key, val);
|
||||
} else if (window.widget) {
|
||||
window.widget.setPreferenceForKey(val, key);
|
||||
} else {
|
||||
val = encodeURIComponent(val);
|
||||
document.cookie = encodeURIComponent(key) + '=' + val + '; expires=Fri, 31 Dec 9999 23:59:59 GMT';
|
||||
}
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
var loaded = false;
|
||||
return {
|
||||
name: 'storage',
|
||||
langReady: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
|
||||
var _$$deparam$querystrin, storagePrompt, confirmSetStorage, message, storagePrefsAndContent, storagePrefsOnly, storagePrefs, storageNoPrefsOrContent, storageNoPrefs, rememberLabel, rememberTooltip, options, oldContainerWidth, oldContainerMarginLeft, oldContentHeight, oldContainerHeight;
|
||||
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_$$deparam$querystrin = $.deparam.querystring(true), storagePrompt = _$$deparam$querystrin.storagePrompt;
|
||||
_context.next = 3;
|
||||
return importLocale();
|
||||
|
||||
case 3:
|
||||
confirmSetStorage = _context.sent;
|
||||
message = confirmSetStorage.message, storagePrefsAndContent = confirmSetStorage.storagePrefsAndContent, storagePrefsOnly = confirmSetStorage.storagePrefsOnly, storagePrefs = confirmSetStorage.storagePrefs, storageNoPrefsOrContent = confirmSetStorage.storageNoPrefsOrContent, storageNoPrefs = confirmSetStorage.storageNoPrefs, rememberLabel = confirmSetStorage.rememberLabel, rememberTooltip = confirmSetStorage.rememberTooltip;
|
||||
|
||||
// No need to run this one-time dialog again just because the user
|
||||
// changes the language
|
||||
|
||||
if (!loaded) {
|
||||
_context.next = 7;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context.abrupt('return');
|
||||
|
||||
case 7:
|
||||
loaded = true;
|
||||
|
||||
// Note that the following can load even if "noStorageOnLoad" is
|
||||
// set to false; to avoid any chance of storage, avoid this
|
||||
// extension! (and to avoid using any prior storage, set the
|
||||
// config option "noStorageOnLoad" to true).
|
||||
if (!forceStorage && (
|
||||
// If the URL has been explicitly set to always prompt the
|
||||
// user (e.g., so one can be pointed to a URL where one
|
||||
// can alter one's settings, say to prevent future storage)...
|
||||
storagePrompt === true ||
|
||||
// ...or...if the URL at least doesn't explicitly prevent a
|
||||
// storage prompt (as we use for users who
|
||||
// don't want to set cookies at all but who don't want
|
||||
// continual prompts about it)...
|
||||
storagePrompt !== false &&
|
||||
// ...and this user hasn't previously indicated a desire for storage
|
||||
!document.cookie.match(/(?:^|;\s*)store=(?:prefsAndContent|prefsOnly)/)
|
||||
// ...then show the storage prompt.
|
||||
)) {
|
||||
options = [];
|
||||
|
||||
if (storage) {
|
||||
options.unshift({ value: 'prefsAndContent', text: storagePrefsAndContent }, { value: 'prefsOnly', text: storagePrefsOnly }, { value: 'noPrefsOrContent', text: storageNoPrefsOrContent });
|
||||
} else {
|
||||
options.unshift({ value: 'prefsOnly', text: storagePrefs }, { value: 'noPrefsOrContent', text: storageNoPrefs });
|
||||
}
|
||||
|
||||
// Hack to temporarily provide a wide and high enough dialog
|
||||
oldContainerWidth = $('#dialog_container')[0].style.width, oldContainerMarginLeft = $('#dialog_container')[0].style.marginLeft, oldContentHeight = $('#dialog_content')[0].style.height, oldContainerHeight = $('#dialog_container')[0].style.height;
|
||||
|
||||
$('#dialog_content')[0].style.height = '120px';
|
||||
$('#dialog_container')[0].style.height = '170px';
|
||||
$('#dialog_container')[0].style.width = '800px';
|
||||
$('#dialog_container')[0].style.marginLeft = '-400px';
|
||||
|
||||
// Open select-with-checkbox dialog
|
||||
// From svg-editor.js
|
||||
$.select(message, options, function (pref, checked) {
|
||||
if (pref && pref !== 'noPrefsOrContent') {
|
||||
// Regardless of whether the user opted
|
||||
// to remember the choice (and move to a URL which won't
|
||||
// ask them again), we have to assume the user
|
||||
// doesn't even want to remember their not wanting
|
||||
// storage, so we don't set the cookie or continue on with
|
||||
// setting storage on beforeunload
|
||||
document.cookie = 'store=' + encodeURIComponent(pref) + '; expires=Fri, 31 Dec 9999 23:59:59 GMT'; // 'prefsAndContent' | 'prefsOnly'
|
||||
// If the URL was configured to always insist on a prompt, if
|
||||
// the user does indicate a wish to store their info, we
|
||||
// don't want ask them again upon page refresh so move
|
||||
// them instead to a URL which does not always prompt
|
||||
if (storagePrompt === true && checked) {
|
||||
replaceStoragePrompt();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// The user does not wish storage (or cancelled, which we treat equivalently)
|
||||
removeStoragePrefCookie();
|
||||
if (pref && // If the user explicitly expresses wish for no storage
|
||||
emptyStorageOnDecline) {
|
||||
emptyStorage();
|
||||
}
|
||||
if (pref && checked) {
|
||||
// Open a URL which won't set storage and won't prompt user about storage
|
||||
replaceStoragePrompt('false');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset width/height of dialog (e.g., for use by Export)
|
||||
$('#dialog_container')[0].style.width = oldContainerWidth;
|
||||
$('#dialog_container')[0].style.marginLeft = oldContainerMarginLeft;
|
||||
$('#dialog_content')[0].style.height = oldContentHeight;
|
||||
$('#dialog_container')[0].style.height = oldContainerHeight;
|
||||
|
||||
// It should be enough to (conditionally) add to storage on
|
||||
// beforeunload, but if we wished to update immediately,
|
||||
// we might wish to try setting:
|
||||
// svgEditor.setConfig({noStorageOnLoad: true});
|
||||
// and then call:
|
||||
// svgEditor.loadContentAndPrefs();
|
||||
|
||||
// We don't check for noStorageOnLoad here because
|
||||
// the prompt gives the user the option to store data
|
||||
setupBeforeUnloadListener();
|
||||
|
||||
svgEditor.storagePromptClosed = true;
|
||||
}, null, null, {
|
||||
label: rememberLabel,
|
||||
checked: false,
|
||||
tooltip: rememberTooltip
|
||||
});
|
||||
} else if (!noStorageOnLoad || forceStorage) {
|
||||
setupBeforeUnloadListener();
|
||||
}
|
||||
|
||||
case 9:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function langReady(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return langReady;
|
||||
}()
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return extStorage;
|
||||
|
||||
}());
|
|
@ -0,0 +1,168 @@
|
|||
var svgEditorExtension_webappfind = (function () {
|
||||
'use strict';
|
||||
|
||||
var asyncToGenerator = function (fn) {
|
||||
return function () {
|
||||
var gen = fn.apply(this, arguments);
|
||||
return new Promise(function (resolve, reject) {
|
||||
function step(key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
return Promise.resolve(value).then(function (value) {
|
||||
step("next", value);
|
||||
}, function (err) {
|
||||
step("throw", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return step("next");
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Depends on Firefox add-on and executables from {@link https://github.com/brettz9/webappfind}
|
||||
* @author Brett Zamir
|
||||
* @license MIT
|
||||
* @todo See WebAppFind Readme for SVG-related todos
|
||||
*/
|
||||
|
||||
var extWebappfind = {
|
||||
name: 'webappfind',
|
||||
init: function () {
|
||||
var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
|
||||
var importLocale = _ref.importLocale;
|
||||
var strings, svgEditor, saveMessage, readMessage, excludedMessages, pathID, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return importLocale();
|
||||
|
||||
case 2:
|
||||
strings = _context.sent;
|
||||
svgEditor = this;
|
||||
saveMessage = 'save', readMessage = 'read', excludedMessages = [readMessage, saveMessage];
|
||||
pathID = void 0;
|
||||
|
||||
this.canvas.bind('message',
|
||||
/**
|
||||
* @param {external:Window} win
|
||||
* @param {module:svgcanvas.SvgCanvas#event:message} data
|
||||
* @listens module:svgcanvas.SvgCanvas#event:message
|
||||
* @throws {Error} Unexpected event type
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function (win, _ref3) {
|
||||
var data = _ref3.data,
|
||||
origin = _ref3.origin;
|
||||
|
||||
// console.log('data, origin', data, origin);
|
||||
var type = void 0,
|
||||
content = void 0;
|
||||
try {
|
||||
// May throw if data is not an object
|
||||
var _data$webappfind = data.webappfind;
|
||||
type = _data$webappfind.type;
|
||||
pathID = _data$webappfind.pathID;
|
||||
content = _data$webappfind.content;
|
||||
if (origin !== location.origin || // We are only interested in a message sent as though within this URL by our browser add-on
|
||||
excludedMessages.includes(type) // Avoid our post below (other messages might be possible in the future which may also need to be excluded if your subsequent code makes assumptions on the type of message this is)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 'view':
|
||||
// Populate the contents
|
||||
svgEditor.loadFromString(content);
|
||||
|
||||
/* if ($('#tool_save_file')) {
|
||||
$('#tool_save_file').disabled = false;
|
||||
} */
|
||||
break;
|
||||
case 'save-end':
|
||||
alert('save complete for pathID ' + pathID + '!');
|
||||
break;
|
||||
default:
|
||||
throw new Error('Unexpected WebAppFind event type');
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
window.postMessage({
|
||||
webappfind: {
|
||||
type: readMessage
|
||||
}
|
||||
}, window.location.origin === 'null'
|
||||
// Avoid "null" string error for `file:` protocol (even though
|
||||
// file protocol not currently supported by Firefox)
|
||||
? '*'
|
||||
: window.location.origin
|
||||
);
|
||||
*/
|
||||
buttons = [{
|
||||
id: 'webappfind_save', //
|
||||
icon: svgEditor.curConfig.extIconsPath + 'webappfind.png',
|
||||
type: 'app_menu',
|
||||
position: 4, // Before 0-based index position 4 (after the regular "Save Image (S)")
|
||||
events: {
|
||||
click: function click() {
|
||||
if (!pathID) {
|
||||
// Not ready yet as haven't received first payload
|
||||
return;
|
||||
}
|
||||
window.postMessage({
|
||||
webappfind: {
|
||||
type: saveMessage,
|
||||
pathID: pathID,
|
||||
content: svgEditor.canvas.getSvgString()
|
||||
}
|
||||
}, window.location.origin === 'null'
|
||||
// Avoid "null" string error for `file:` protocol (even
|
||||
// though file protocol not currently supported by add-on)
|
||||
? '*' : window.location.origin);
|
||||
}
|
||||
}
|
||||
}];
|
||||
return _context.abrupt('return', {
|
||||
name: strings.name,
|
||||
svgicons: svgEditor.curConfig.extIconsPath + 'webappfind-icon.svg',
|
||||
buttons: strings.buttons.map(function (button, i) {
|
||||
return Object.assign(buttons[i], button);
|
||||
})
|
||||
});
|
||||
|
||||
case 9:
|
||||
case 'end':
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function init(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return init;
|
||||
}()
|
||||
};
|
||||
|
||||
return extWebappfind;
|
||||
|
||||
}());
|
|
@ -0,0 +1,62 @@
|
|||
var svgEditorExtension_xdomain_messaging = (function () {
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
|
||||
/**
|
||||
* Should not be needed for same domain control (just call via child frame),
|
||||
* but an API common for cross-domain and same domain use can be found
|
||||
* in embedapi.js with a demo at embedapi.html
|
||||
*/
|
||||
var extXdomainMessaging = {
|
||||
name: 'xdomain-messaging',
|
||||
init: function init() {
|
||||
var svgEditor = this;
|
||||
var svgCanvas = svgEditor.canvas;
|
||||
try {
|
||||
window.addEventListener('message', function (e) {
|
||||
// We accept and post strings for the sake of IE9 support
|
||||
if (typeof e.data !== 'string' || e.data.charAt() === '|') {
|
||||
return;
|
||||
}
|
||||
var data = JSON.parse(e.data);
|
||||
if (!data || (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object' || data.namespace !== 'svgCanvas') {
|
||||
return;
|
||||
}
|
||||
// The default is not to allow any origins, including even the same domain or
|
||||
// if run on a file:// URL See svgedit-config-es.js for an example of how
|
||||
// to configure
|
||||
var allowedOrigins = svgEditor.curConfig.allowedOrigins;
|
||||
|
||||
if (!allowedOrigins.includes('*') && !allowedOrigins.includes(e.origin)) {
|
||||
console.log('Origin ' + e.origin + ' not whitelisted for posting to ' + window.origin);
|
||||
return;
|
||||
}
|
||||
var cbid = data.id;
|
||||
var name = data.name,
|
||||
args = data.args;
|
||||
|
||||
var message = {
|
||||
namespace: 'svg-edit',
|
||||
id: cbid
|
||||
};
|
||||
try {
|
||||
message.result = svgCanvas[name].apply(svgCanvas, args);
|
||||
} catch (err) {
|
||||
message.error = err.message;
|
||||
}
|
||||
e.source.postMessage(JSON.stringify(message), '*');
|
||||
}, false);
|
||||
} catch (err) {
|
||||
console.log('Error with xdomain message listener: ' + err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return extXdomainMessaging;
|
||||
|
||||
}());
|
|
@ -0,0 +1,67 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var _extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
/* globals jQuery */
|
||||
var $ = jQuery;
|
||||
$('a').click(function () {
|
||||
var href = this.href;
|
||||
|
||||
var target = window.parent;
|
||||
var post = function post(message) {
|
||||
// Todo: Make origin customizable as set by opening window
|
||||
// Todo: If dropping IE9, avoid stringifying
|
||||
target.postMessage(JSON.stringify(_extends({
|
||||
namespace: 'imagelib'
|
||||
}, message)), '*');
|
||||
};
|
||||
// Convert Non-SVG images to data URL first
|
||||
// (this could also have been done server-side by the library)
|
||||
// Send metadata (also indicates file is about to be sent)
|
||||
post({
|
||||
name: $(this).text(),
|
||||
id: href
|
||||
});
|
||||
if (!this.href.includes('.svg')) {
|
||||
var img = new Image();
|
||||
img.onload = function () {
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
// load the raster image into the canvas
|
||||
canvas.getContext('2d').drawImage(this, 0, 0);
|
||||
// retrieve the data: URL
|
||||
var data = void 0;
|
||||
try {
|
||||
data = canvas.toDataURL();
|
||||
} catch (err) {
|
||||
// This fails in Firefox with file:// URLs :(
|
||||
alert('Data URL conversion failed: ' + err);
|
||||
data = '';
|
||||
}
|
||||
post({ href: href, data: data });
|
||||
};
|
||||
img.src = href;
|
||||
} else {
|
||||
// Do ajax request for image's href value
|
||||
$.get(href, function (data) {
|
||||
post({ href: href, data: data });
|
||||
}, 'html'); // 'html' is necessary to keep returned data as a string
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
}());
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,560 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var classCallCheck = function (instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
};
|
||||
|
||||
var createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
|
||||
var slicedToArray = function () {
|
||||
function sliceIterator(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"]) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
return function (arr, i) {
|
||||
if (Array.isArray(arr)) {
|
||||
return arr;
|
||||
} else if (Symbol.iterator in Object(arr)) {
|
||||
return sliceIterator(arr, i);
|
||||
} else {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
var toConsumableArray = function (arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
} else {
|
||||
return Array.from(arr);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* For parsing color values
|
||||
* @module RGBColor
|
||||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||||
* @see https://www.phpied.com/rgb-color-parser-in-javascript/
|
||||
* @license MIT
|
||||
*/
|
||||
var simpleColors = {
|
||||
aliceblue: 'f0f8ff',
|
||||
antiquewhite: 'faebd7',
|
||||
aqua: '00ffff',
|
||||
aquamarine: '7fffd4',
|
||||
azure: 'f0ffff',
|
||||
beige: 'f5f5dc',
|
||||
bisque: 'ffe4c4',
|
||||
black: '000000',
|
||||
blanchedalmond: 'ffebcd',
|
||||
blue: '0000ff',
|
||||
blueviolet: '8a2be2',
|
||||
brown: 'a52a2a',
|
||||
burlywood: 'deb887',
|
||||
cadetblue: '5f9ea0',
|
||||
chartreuse: '7fff00',
|
||||
chocolate: 'd2691e',
|
||||
coral: 'ff7f50',
|
||||
cornflowerblue: '6495ed',
|
||||
cornsilk: 'fff8dc',
|
||||
crimson: 'dc143c',
|
||||
cyan: '00ffff',
|
||||
darkblue: '00008b',
|
||||
darkcyan: '008b8b',
|
||||
darkgoldenrod: 'b8860b',
|
||||
darkgray: 'a9a9a9',
|
||||
darkgreen: '006400',
|
||||
darkkhaki: 'bdb76b',
|
||||
darkmagenta: '8b008b',
|
||||
darkolivegreen: '556b2f',
|
||||
darkorange: 'ff8c00',
|
||||
darkorchid: '9932cc',
|
||||
darkred: '8b0000',
|
||||
darksalmon: 'e9967a',
|
||||
darkseagreen: '8fbc8f',
|
||||
darkslateblue: '483d8b',
|
||||
darkslategray: '2f4f4f',
|
||||
darkturquoise: '00ced1',
|
||||
darkviolet: '9400d3',
|
||||
deeppink: 'ff1493',
|
||||
deepskyblue: '00bfff',
|
||||
dimgray: '696969',
|
||||
dodgerblue: '1e90ff',
|
||||
feldspar: 'd19275',
|
||||
firebrick: 'b22222',
|
||||
floralwhite: 'fffaf0',
|
||||
forestgreen: '228b22',
|
||||
fuchsia: 'ff00ff',
|
||||
gainsboro: 'dcdcdc',
|
||||
ghostwhite: 'f8f8ff',
|
||||
gold: 'ffd700',
|
||||
goldenrod: 'daa520',
|
||||
gray: '808080',
|
||||
green: '008000',
|
||||
greenyellow: 'adff2f',
|
||||
honeydew: 'f0fff0',
|
||||
hotpink: 'ff69b4',
|
||||
indianred: 'cd5c5c',
|
||||
indigo: '4b0082',
|
||||
ivory: 'fffff0',
|
||||
khaki: 'f0e68c',
|
||||
lavender: 'e6e6fa',
|
||||
lavenderblush: 'fff0f5',
|
||||
lawngreen: '7cfc00',
|
||||
lemonchiffon: 'fffacd',
|
||||
lightblue: 'add8e6',
|
||||
lightcoral: 'f08080',
|
||||
lightcyan: 'e0ffff',
|
||||
lightgoldenrodyellow: 'fafad2',
|
||||
lightgrey: 'd3d3d3',
|
||||
lightgreen: '90ee90',
|
||||
lightpink: 'ffb6c1',
|
||||
lightsalmon: 'ffa07a',
|
||||
lightseagreen: '20b2aa',
|
||||
lightskyblue: '87cefa',
|
||||
lightslateblue: '8470ff',
|
||||
lightslategray: '778899',
|
||||
lightsteelblue: 'b0c4de',
|
||||
lightyellow: 'ffffe0',
|
||||
lime: '00ff00',
|
||||
limegreen: '32cd32',
|
||||
linen: 'faf0e6',
|
||||
magenta: 'ff00ff',
|
||||
maroon: '800000',
|
||||
mediumaquamarine: '66cdaa',
|
||||
mediumblue: '0000cd',
|
||||
mediumorchid: 'ba55d3',
|
||||
mediumpurple: '9370d8',
|
||||
mediumseagreen: '3cb371',
|
||||
mediumslateblue: '7b68ee',
|
||||
mediumspringgreen: '00fa9a',
|
||||
mediumturquoise: '48d1cc',
|
||||
mediumvioletred: 'c71585',
|
||||
midnightblue: '191970',
|
||||
mintcream: 'f5fffa',
|
||||
mistyrose: 'ffe4e1',
|
||||
moccasin: 'ffe4b5',
|
||||
navajowhite: 'ffdead',
|
||||
navy: '000080',
|
||||
oldlace: 'fdf5e6',
|
||||
olive: '808000',
|
||||
olivedrab: '6b8e23',
|
||||
orange: 'ffa500',
|
||||
orangered: 'ff4500',
|
||||
orchid: 'da70d6',
|
||||
palegoldenrod: 'eee8aa',
|
||||
palegreen: '98fb98',
|
||||
paleturquoise: 'afeeee',
|
||||
palevioletred: 'd87093',
|
||||
papayawhip: 'ffefd5',
|
||||
peachpuff: 'ffdab9',
|
||||
peru: 'cd853f',
|
||||
pink: 'ffc0cb',
|
||||
plum: 'dda0dd',
|
||||
powderblue: 'b0e0e6',
|
||||
purple: '800080',
|
||||
red: 'ff0000',
|
||||
rosybrown: 'bc8f8f',
|
||||
royalblue: '4169e1',
|
||||
saddlebrown: '8b4513',
|
||||
salmon: 'fa8072',
|
||||
sandybrown: 'f4a460',
|
||||
seagreen: '2e8b57',
|
||||
seashell: 'fff5ee',
|
||||
sienna: 'a0522d',
|
||||
silver: 'c0c0c0',
|
||||
skyblue: '87ceeb',
|
||||
slateblue: '6a5acd',
|
||||
slategray: '708090',
|
||||
snow: 'fffafa',
|
||||
springgreen: '00ff7f',
|
||||
steelblue: '4682b4',
|
||||
tan: 'd2b48c',
|
||||
teal: '008080',
|
||||
thistle: 'd8bfd8',
|
||||
tomato: 'ff6347',
|
||||
turquoise: '40e0d0',
|
||||
violet: 'ee82ee',
|
||||
violetred: 'd02090',
|
||||
wheat: 'f5deb3',
|
||||
white: 'ffffff',
|
||||
whitesmoke: 'f5f5f5',
|
||||
yellow: 'ffff00',
|
||||
yellowgreen: '9acd32'
|
||||
};
|
||||
|
||||
// array of color definition objects
|
||||
var colorDefs = [{
|
||||
re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
|
||||
example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
|
||||
process: function process(bits) {
|
||||
return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10)];
|
||||
}
|
||||
}, {
|
||||
re: /^(\w{2})(\w{2})(\w{2})$/,
|
||||
example: ['#00ff00', '336699'],
|
||||
process: function process(bits) {
|
||||
return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16)];
|
||||
}
|
||||
}, {
|
||||
re: /^(\w{1})(\w{1})(\w{1})$/,
|
||||
example: ['#fb0', 'f0f'],
|
||||
process: function process(bits) {
|
||||
return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16)];
|
||||
}
|
||||
}];
|
||||
|
||||
/**
|
||||
* A class to parse color values
|
||||
*/
|
||||
|
||||
var RGBColor = function () {
|
||||
/**
|
||||
* @param {string} colorString
|
||||
*/
|
||||
function RGBColor(colorString) {
|
||||
classCallCheck(this, RGBColor);
|
||||
|
||||
this.ok = false;
|
||||
|
||||
// strip any leading #
|
||||
if (colorString.charAt(0) === '#') {
|
||||
// remove # if any
|
||||
colorString = colorString.substr(1, 6);
|
||||
}
|
||||
|
||||
colorString = colorString.replace(/ /g, '');
|
||||
colorString = colorString.toLowerCase();
|
||||
|
||||
// before getting into regexps, try simple matches
|
||||
// and overwrite the input
|
||||
if (colorString in simpleColors) {
|
||||
colorString = simpleColors[colorString];
|
||||
}
|
||||
// end of simple type-in colors
|
||||
|
||||
// search through the definitions to find a match
|
||||
for (var i = 0; i < colorDefs.length; i++) {
|
||||
var re = colorDefs[i].re;
|
||||
|
||||
var processor = colorDefs[i].process;
|
||||
var bits = re.exec(colorString);
|
||||
if (bits) {
|
||||
var _processor = processor(bits),
|
||||
_processor2 = slicedToArray(_processor, 3),
|
||||
r = _processor2[0],
|
||||
g = _processor2[1],
|
||||
b = _processor2[2];
|
||||
|
||||
Object.assign(this, { r: r, g: g, b: b });
|
||||
this.ok = true;
|
||||
}
|
||||
}
|
||||
|
||||
// validate/cleanup values
|
||||
this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;
|
||||
this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;
|
||||
this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;
|
||||
}
|
||||
|
||||
// some getters
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
||||
createClass(RGBColor, [{
|
||||
key: 'toRGB',
|
||||
value: function toRGB() {
|
||||
return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'toHex',
|
||||
value: function toHex() {
|
||||
var r = this.r.toString(16);
|
||||
var g = this.g.toString(16);
|
||||
var b = this.b.toString(16);
|
||||
if (r.length === 1) {
|
||||
r = '0' + r;
|
||||
}
|
||||
if (g.length === 1) {
|
||||
g = '0' + g;
|
||||
}
|
||||
if (b.length === 1) {
|
||||
b = '0' + b;
|
||||
}
|
||||
return '#' + r + g + b;
|
||||
}
|
||||
|
||||
/**
|
||||
* help
|
||||
* @returns {HTMLUListElement}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'getHelpXML',
|
||||
value: function getHelpXML() {
|
||||
var examples = [];
|
||||
// add regexps
|
||||
for (var i = 0; i < colorDefs.length; i++) {
|
||||
var example = colorDefs[i].example;
|
||||
|
||||
for (var j = 0; j < example.length; j++) {
|
||||
examples[examples.length] = example[j];
|
||||
}
|
||||
}
|
||||
// add type-in colors
|
||||
examples.push.apply(examples, toConsumableArray(Object.keys(simpleColors)));
|
||||
|
||||
var xml = document.createElement('ul');
|
||||
xml.setAttribute('id', 'rgbcolor-examples');
|
||||
for (var _i = 0; _i < examples.length; _i++) {
|
||||
try {
|
||||
var listItem = document.createElement('li');
|
||||
var listColor = new RGBColor(examples[_i]);
|
||||
var exampleDiv = document.createElement('div');
|
||||
exampleDiv.style.cssText = 'margin: 3px;\nborder: 1px solid black;\nbackground: ' + listColor.toHex() + ';\ncolor: ' + listColor.toHex() + ';';
|
||||
exampleDiv.append('test');
|
||||
var listItemValue = ' ' + examples[_i] + ' -> ' + listColor.toRGB() + ' -> ' + listColor.toHex();
|
||||
listItem.append(exampleDiv, listItemValue);
|
||||
xml.append(listItem);
|
||||
} catch (e) {}
|
||||
}
|
||||
return xml;
|
||||
}
|
||||
}]);
|
||||
return RGBColor;
|
||||
}();
|
||||
|
||||
/* globals jsPDF */
|
||||
|
||||
var jsPDFAPI = jsPDF.API;
|
||||
var pdfSvgAttr = {
|
||||
// allowed attributes. all others are removed from the preview.
|
||||
g: ['stroke', 'fill', 'stroke-width'],
|
||||
line: ['x1', 'y1', 'x2', 'y2', 'stroke', 'stroke-width'],
|
||||
rect: ['x', 'y', 'width', 'height', 'stroke', 'fill', 'stroke-width'],
|
||||
ellipse: ['cx', 'cy', 'rx', 'ry', 'stroke', 'fill', 'stroke-width'],
|
||||
circle: ['cx', 'cy', 'r', 'stroke', 'fill', 'stroke-width'],
|
||||
text: ['x', 'y', 'font-size', 'font-family', 'text-anchor', 'font-weight', 'font-style', 'fill']
|
||||
};
|
||||
|
||||
var attributeIsNotEmpty = function attributeIsNotEmpty(node, attr) {
|
||||
var attVal = attr ? node.getAttribute(attr) : node;
|
||||
return attVal !== '' && attVal !== null;
|
||||
};
|
||||
|
||||
var nodeIs = function nodeIs(node, possible) {
|
||||
return possible.includes(node.tagName.toLowerCase());
|
||||
};
|
||||
|
||||
var removeAttributes = function removeAttributes(node, attributes) {
|
||||
var toRemove = [];
|
||||
[].forEach.call(node.attributes, function (a) {
|
||||
if (attributeIsNotEmpty(a) && !attributes.includes(a.name.toLowerCase())) {
|
||||
toRemove.push(a.name);
|
||||
}
|
||||
});
|
||||
|
||||
toRemove.forEach(function (a) {
|
||||
node.removeAttribute(a.name);
|
||||
});
|
||||
};
|
||||
|
||||
var svgElementToPdf = function svgElementToPdf(element, pdf, options) {
|
||||
// pdf is a jsPDF object
|
||||
// console.log('options =', options);
|
||||
var remove = options.removeInvalid === undefined ? false : options.removeInvalid;
|
||||
var k = options.scale === undefined ? 1.0 : options.scale;
|
||||
var colorMode = null;
|
||||
[].forEach.call(element.children, function (node) {
|
||||
// console.log('passing: ', node);
|
||||
// let hasStrokeColor = false;
|
||||
var hasFillColor = false;
|
||||
var fillRGB = void 0;
|
||||
if (nodeIs(node, ['g', 'line', 'rect', 'ellipse', 'circle', 'text'])) {
|
||||
var fillColor = node.getAttribute('fill');
|
||||
if (attributeIsNotEmpty(fillColor)) {
|
||||
fillRGB = new RGBColor(fillColor);
|
||||
if (fillRGB.ok) {
|
||||
hasFillColor = true;
|
||||
colorMode = 'F';
|
||||
} else {
|
||||
colorMode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nodeIs(node, ['g', 'line', 'rect', 'ellipse', 'circle'])) {
|
||||
if (hasFillColor) {
|
||||
pdf.setFillColor(fillRGB.r, fillRGB.g, fillRGB.b);
|
||||
}
|
||||
if (attributeIsNotEmpty(node, 'stroke-width')) {
|
||||
pdf.setLineWidth(k * parseInt(node.getAttribute('stroke-width'), 10));
|
||||
}
|
||||
var strokeColor = node.getAttribute('stroke');
|
||||
if (attributeIsNotEmpty(strokeColor)) {
|
||||
var strokeRGB = new RGBColor(strokeColor);
|
||||
if (strokeRGB.ok) {
|
||||
// hasStrokeColor = true;
|
||||
pdf.setDrawColor(strokeRGB.r, strokeRGB.g, strokeRGB.b);
|
||||
if (colorMode === 'F') {
|
||||
colorMode = 'FD';
|
||||
} else {
|
||||
colorMode = null;
|
||||
}
|
||||
} else {
|
||||
colorMode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (node.tagName.toLowerCase()) {
|
||||
case 'svg':
|
||||
case 'a':
|
||||
case 'g':
|
||||
svgElementToPdf(node, pdf, options);
|
||||
removeAttributes(node, pdfSvgAttr.g);
|
||||
break;
|
||||
case 'line':
|
||||
pdf.line(k * parseInt(node.getAttribute('x1'), 10), k * parseInt(node.getAttribute('y1'), 10), k * parseInt(node.getAttribute('x2'), 10), k * parseInt(node.getAttribute('y2'), 10));
|
||||
removeAttributes(node, pdfSvgAttr.line);
|
||||
break;
|
||||
case 'rect':
|
||||
pdf.rect(k * parseInt(node.getAttribute('x'), 10), k * parseInt(node.getAttribute('y'), 10), k * parseInt(node.getAttribute('width'), 10), k * parseInt(node.getAttribute('height'), 10), colorMode);
|
||||
removeAttributes(node, pdfSvgAttr.rect);
|
||||
break;
|
||||
case 'ellipse':
|
||||
pdf.ellipse(k * parseInt(node.getAttribute('cx'), 10), k * parseInt(node.getAttribute('cy'), 10), k * parseInt(node.getAttribute('rx'), 10), k * parseInt(node.getAttribute('ry'), 10), colorMode);
|
||||
removeAttributes(node, pdfSvgAttr.ellipse);
|
||||
break;
|
||||
case 'circle':
|
||||
pdf.circle(k * parseInt(node.getAttribute('cx'), 10), k * parseInt(node.getAttribute('cy'), 10), k * parseInt(node.getAttribute('r'), 10), colorMode);
|
||||
removeAttributes(node, pdfSvgAttr.circle);
|
||||
break;
|
||||
case 'text':
|
||||
if (node.hasAttribute('font-family')) {
|
||||
switch ((node.getAttribute('font-family') || '').toLowerCase()) {
|
||||
case 'serif':
|
||||
pdf.setFont('times');break;
|
||||
case 'monospace':
|
||||
pdf.setFont('courier');break;
|
||||
default:
|
||||
node.setAttribute('font-family', 'sans-serif');
|
||||
pdf.setFont('helvetica');
|
||||
}
|
||||
}
|
||||
if (hasFillColor) {
|
||||
pdf.setTextColor(fillRGB.r, fillRGB.g, fillRGB.b);
|
||||
}
|
||||
var fontType = '';
|
||||
if (node.hasAttribute('font-weight')) {
|
||||
if (node.getAttribute('font-weight') === 'bold') {
|
||||
fontType = 'bold';
|
||||
} else {
|
||||
node.removeAttribute('font-weight');
|
||||
}
|
||||
}
|
||||
if (node.hasAttribute('font-style')) {
|
||||
if (node.getAttribute('font-style') === 'italic') {
|
||||
fontType += 'italic';
|
||||
} else {
|
||||
node.removeAttribute('font-style');
|
||||
}
|
||||
}
|
||||
pdf.setFontType(fontType);
|
||||
var pdfFontSize = node.hasAttribute('font-size') ? parseInt(node.getAttribute('font-size'), 10) : 16;
|
||||
|
||||
var box = node.getBBox();
|
||||
// FIXME: use more accurate positioning!!
|
||||
var x = void 0,
|
||||
y = void 0,
|
||||
xOffset = 0;
|
||||
if (node.hasAttribute('text-anchor')) {
|
||||
switch (node.getAttribute('text-anchor')) {
|
||||
case 'end':
|
||||
xOffset = box.width;break;
|
||||
case 'middle':
|
||||
xOffset = box.width / 2;break;
|
||||
case 'start':
|
||||
break;
|
||||
case 'default':
|
||||
node.setAttribute('text-anchor', 'start');break;
|
||||
}
|
||||
x = parseInt(node.getAttribute('x'), 10) - xOffset;
|
||||
y = parseInt(node.getAttribute('y'), 10);
|
||||
}
|
||||
// console.log('fontSize:', pdfFontSize, 'text:', node.textContent);
|
||||
pdf.setFontSize(pdfFontSize).text(k * x, k * y, node.textContent);
|
||||
removeAttributes(node, pdfSvgAttr.text);
|
||||
break;
|
||||
// TODO: image
|
||||
default:
|
||||
if (remove) {
|
||||
console.log("can't translate to pdf:", node);
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
return pdf;
|
||||
};
|
||||
|
||||
jsPDFAPI.addSVG = function (element, x, y, options) {
|
||||
options = options === undefined ? {} : options;
|
||||
options.x_offset = x;
|
||||
options.y_offset = y;
|
||||
|
||||
if (typeof element === 'string') {
|
||||
element = new DOMParser().parseFromString(element, 'text/xml').documentElement;
|
||||
}
|
||||
svgElementToPdf(element, this, options);
|
||||
return this;
|
||||
};
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_af = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_af = {
|
||||
lang: 'af',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Spaar',
|
||||
cancel: 'Annuleer',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Klik om te verander vul kleur, verskuiwing klik om 'n beroerte kleur verander',
|
||||
zoom_level: 'Change zoom vlak',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Verandering vul kleur',
|
||||
stroke_color: 'Verandering beroerte kleur',
|
||||
stroke_style: 'Verandering beroerte dash styl',
|
||||
stroke_width: 'Verandering beroerte breedte',
|
||||
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',
|
||||
angle: 'Verandering rotasie-hoek',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Verander geselekteerde item opaciteit',
|
||||
circle_cx: 'Verandering sirkel se cx koördineer',
|
||||
circle_cy: 'Verandering sirkel se cy koördineer',
|
||||
circle_r: 'Verandering sirkel se radius',
|
||||
ellipse_cx: 'Verandering ellips se cx koördineer',
|
||||
ellipse_cy: 'Verander ellips se cy koördineer',
|
||||
ellipse_rx: 'Verandering ellips se x radius',
|
||||
ellipse_ry: 'Verander ellips se j radius',
|
||||
line_x1: 'Verandering lyn se vertrek x koördinaat',
|
||||
line_x2: 'Verandering lyn se eindig x koördinaat',
|
||||
line_y1: 'Verandering lyn se vertrek y koördinaat',
|
||||
line_y2: 'Verandering lyn se eindig y koördinaat',
|
||||
rect_height: 'Verandering reghoek hoogte',
|
||||
rect_width: 'Verandering reghoek breedte',
|
||||
corner_radius: 'Verandering Rechthoek Corner Radius',
|
||||
image_width: 'Verander prent breedte',
|
||||
image_height: 'Verandering prent hoogte',
|
||||
image_url: 'URL verander',
|
||||
node_x: 'Change node\'s x coordinate',
|
||||
node_y: 'Change node\'s y coordinate',
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Verander teks inhoud',
|
||||
font_family: 'Lettertipe verander Familie',
|
||||
font_size: 'Verandering Lettertipe Grootte',
|
||||
bold: 'Vetgedrukte teks',
|
||||
italic: 'Italic Text'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Verander agtergrondkleur / opaciteit',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Pas na inhoud',
|
||||
fit_to_all: 'Passing tot al inhoud',
|
||||
fit_to_canvas: 'Passing tot doek',
|
||||
fit_to_layer_content: 'Passing tot laag inhoud',
|
||||
fit_to_sel: 'Passing tot seleksie',
|
||||
align_relative_to: 'Align in verhouding tot ...',
|
||||
relativeTo: 'relatief tot:',
|
||||
page: 'bladsy',
|
||||
largest_object: 'grootste voorwerp',
|
||||
selected_objects: 'verkose voorwerpe',
|
||||
smallest_object: 'kleinste voorwerp',
|
||||
new_doc: 'Nuwe Beeld',
|
||||
open_doc: 'Open Beeld',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Slaan Beeld',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Align Bottom',
|
||||
align_center: 'Rig Middel',
|
||||
align_left: 'Links Regterkant',
|
||||
align_middle: 'Align Midde',
|
||||
align_right: 'Lijn regs uit',
|
||||
align_top: 'Align Top',
|
||||
mode_select: 'Select Gereedschap',
|
||||
mode_fhpath: 'Potlood tool',
|
||||
mode_line: 'Lyn Gereedskap',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-hand Rectangle',
|
||||
mode_ellipse: 'Ellips',
|
||||
mode_circle: 'Sirkel',
|
||||
mode_fhellipse: 'Gratis-Hand Ellips',
|
||||
mode_path: 'Poli Gereedskap',
|
||||
mode_text: 'Text Gereedskap',
|
||||
mode_image: 'Image Gereedskap',
|
||||
mode_zoom: 'Klik op die Gereedskap',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Boontoe',
|
||||
redo: 'Oordoen',
|
||||
tool_source: 'Wysig Bron',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Groep Elemente',
|
||||
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 Elemente',
|
||||
docprops: 'Document Properties',
|
||||
move_bottom: 'Skuif na Bottom',
|
||||
move_top: 'Skuif na bo',
|
||||
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: 'Spaar',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Verwyder Laag',
|
||||
move_down: 'Beweeg afbreek Down',
|
||||
new: 'Nuwe Layer',
|
||||
rename: 'Rename Layer',
|
||||
move_up: 'Beweeg afbreek 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'
|
||||
},
|
||||
config: {
|
||||
image_props: 'Image Properties',
|
||||
doc_title: 'Title',
|
||||
doc_dims: 'Doek 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: 'Image 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: 'Kies gedefinieerde:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_af;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_ar = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_ar = {
|
||||
lang: 'ar',
|
||||
dir: 'rtl',
|
||||
common: {
|
||||
ok: 'حفظ',
|
||||
cancel: 'إلغاء',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'انقر لتغيير لون التعبئة ، تحولا مزدوجا فوق لتغيير لون السكتة الدماغية',
|
||||
zoom_level: 'تغيير مستوى التكبير',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'تغير لون التعبئة',
|
||||
stroke_color: 'تغير لون السكتة الدماغية',
|
||||
stroke_style: 'تغيير نمط السكتة الدماغية اندفاعة',
|
||||
stroke_width: 'تغيير عرض السكتة الدماغية',
|
||||
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',
|
||||
angle: 'تغيير زاوية الدوران',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'تغيير مختارة غموض البند',
|
||||
circle_cx: 'دائرة التغيير لتنسيق cx',
|
||||
circle_cy: "Change circle's cy coordinate",
|
||||
circle_r: 'التغيير في دائرة نصف قطرها',
|
||||
ellipse_cx: 'تغيير شكل البيضاوي cx تنسيق',
|
||||
ellipse_cy: 'تغيير شكل البيضاوي قبرصي تنسيق',
|
||||
ellipse_rx: 'تغيير شكل البيضاوي خ نصف قطرها',
|
||||
ellipse_ry: 'تغيير القطع الناقص في دائرة نصف قطرها ذ',
|
||||
line_x1: 'تغيير الخط لبدء تنسيق خ',
|
||||
line_x2: 'تغيير الخط لانهاء خ تنسيق',
|
||||
line_y1: 'تغيير الخط لبدء تنسيق ذ',
|
||||
line_y2: 'تغيير الخط لإنهاء تنسيق ذ',
|
||||
rect_height: 'تغيير المستطيل الارتفاع',
|
||||
rect_width: 'تغيير عرض المستطيل',
|
||||
corner_radius: 'تغيير مستطيل ركن الشعاع',
|
||||
image_width: 'تغيير صورة العرض',
|
||||
image_height: 'تغيير ارتفاع الصورة',
|
||||
image_url: 'تغيير العنوان',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'تغيير محتويات النص',
|
||||
font_family: 'تغيير الخط الأسرة',
|
||||
font_size: 'تغيير حجم الخط',
|
||||
bold: 'نص جريء',
|
||||
italic: 'مائل نص'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'تغير لون الخلفية / غموض',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'لائقا للمحتوى',
|
||||
fit_to_all: 'يصلح لجميع المحتويات',
|
||||
fit_to_canvas: 'يصلح لوحة زيتية على قماش',
|
||||
fit_to_layer_content: 'يصلح لطبقة المحتوى',
|
||||
fit_to_sel: 'يصلح لاختيار',
|
||||
align_relative_to: 'محاذاة النسبي ل ...',
|
||||
relativeTo: 'بالنسبة إلى:',
|
||||
page: 'الصفحة',
|
||||
largest_object: 'أكبر كائن',
|
||||
selected_objects: 'انتخب الأجسام',
|
||||
smallest_object: 'أصغر كائن',
|
||||
new_doc: 'صورة جديدة',
|
||||
open_doc: 'فتح الصورة',
|
||||
export_img: 'Export',
|
||||
save_doc: 'حفظ صورة',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'محاذاة القاع',
|
||||
align_center: 'مركز محاذاة',
|
||||
align_left: 'محاذاة إلى اليسار',
|
||||
align_middle: 'محاذاة الأوسط',
|
||||
align_right: 'محاذاة إلى اليمين',
|
||||
align_top: 'محاذاة الأعلى',
|
||||
mode_select: 'اختر أداة',
|
||||
mode_fhpath: 'أداة قلم رصاص',
|
||||
mode_line: 'خط أداة',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rectangle',
|
||||
mode_ellipse: 'القطع الناقص',
|
||||
mode_circle: 'دائرة',
|
||||
mode_fhellipse: 'اليد الحرة البيضوي',
|
||||
mode_path: 'بولي أداة',
|
||||
mode_text: 'النص أداة',
|
||||
mode_image: 'الصورة أداة',
|
||||
mode_zoom: 'أداة تكبير',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'التراجع',
|
||||
redo: 'إعادته',
|
||||
tool_source: 'عدل المصدر',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'مجموعة عناصر',
|
||||
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: 'فك تجميع عناصر',
|
||||
docprops: 'خصائص المستند',
|
||||
move_bottom: 'الانتقال إلى أسفل',
|
||||
move_top: 'الانتقال إلى أعلى',
|
||||
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: 'حفظ',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'حذف طبقة',
|
||||
move_down: 'تحرك لأسفل طبقة',
|
||||
new: 'طبقة جديدة',
|
||||
rename: 'تسمية الطبقة',
|
||||
move_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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'حدد سلفا:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_ar;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_az = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_az = {
|
||||
lang: 'az',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'OK',
|
||||
cancel: 'Cancel',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
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',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Change fill color',
|
||||
stroke_color: 'Change stroke color',
|
||||
stroke_style: 'Change stroke dash style',
|
||||
stroke_width: 'Change stroke width',
|
||||
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',
|
||||
angle: 'Change rotation angle',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Change selected item 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",
|
||||
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',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Change text contents',
|
||||
font_family: 'Change Font Family',
|
||||
font_size: 'Change Font Size',
|
||||
bold: 'Bold Text',
|
||||
italic: 'Italic Text'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Change background color/opacity',
|
||||
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:',
|
||||
page: 'page',
|
||||
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_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rectangle',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Circle',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Text Tool',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Undo',
|
||||
redo: 'Redo',
|
||||
tool_source: 'Edit Source',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Group Elements',
|
||||
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',
|
||||
docprops: 'Document Properties',
|
||||
move_bottom: 'Move to Bottom',
|
||||
move_top: 'Move to Top',
|
||||
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',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_az;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_be = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_be = {
|
||||
lang: 'be',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Захаваць',
|
||||
cancel: 'Адмена',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Націсніце для змены колеру залівання, Shift-Click змяніць обводка',
|
||||
zoom_level: 'Змяненне маштабу',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Змяненне колеру залівання',
|
||||
stroke_color: 'Змяненне колеру інсульт',
|
||||
stroke_style: 'Змяненне стылю інсульт працяжнік',
|
||||
stroke_width: 'Змены шырыня штрых',
|
||||
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',
|
||||
angle: 'Змены вугла павароту',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Старонка абранага пункта непразрыстасці',
|
||||
circle_cx: 'CX змене круга каардынаты',
|
||||
circle_cy: 'Змены гуртка CY каардынаты',
|
||||
circle_r: 'Старонка круга's радыус',
|
||||
ellipse_cx: 'Змены эліпса CX каардынаты',
|
||||
ellipse_cy: 'Змены эліпса CY каардынаты',
|
||||
ellipse_rx: 'Х змяненні эліпса радыюсам',
|
||||
ellipse_ry: 'Змены у эліпса радыюсам',
|
||||
line_x1: 'Змены лінія пачынае каардынаты х',
|
||||
line_x2: 'Змяненне за перыяд, скончыўся лінія каардынаты х',
|
||||
line_y1: 'Змены лінія пачынае Y каардынаты',
|
||||
line_y2: 'Змяненне за перыяд, скончыўся лінія Y каардынаты',
|
||||
rect_height: 'Змены прастакутнік вышынёй',
|
||||
rect_width: 'Змяненне шырыні прамавугольніка',
|
||||
corner_radius: 'Змены прастакутнік Corner Radius',
|
||||
image_width: 'Змены шырыня выявы',
|
||||
image_height: 'Змена вышыні выявы',
|
||||
image_url: 'Змяніць URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Змяненне зместу тэксту',
|
||||
font_family: 'Змены Сямейства шрыфтоў',
|
||||
font_size: 'Змяніць памер шрыфта',
|
||||
bold: 'Тоўсты тэкст',
|
||||
italic: 'Нахілены тэкст'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Змяненне колеру фону / непразрыстасць',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Па памеры ўтрымання',
|
||||
fit_to_all: 'Па памеру ўсе змесціва',
|
||||
fit_to_canvas: 'Памер палатна',
|
||||
fit_to_layer_content: 'По размеру слой ўтрымання',
|
||||
fit_to_sel: 'Выбар памеру',
|
||||
align_relative_to: 'Выраўнаваць па дачыненні да ...',
|
||||
relativeTo: 'па параўнанні з:',
|
||||
page: 'старонка',
|
||||
largest_object: 'найбуйнейшы аб'ект',
|
||||
selected_objects: 'выбранымі аб'ектамі',
|
||||
smallest_object: 'маленькі аб'ект',
|
||||
new_doc: 'Новае выява',
|
||||
open_doc: 'Адкрыць выява',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Захаваць малюнак',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Лінаваць па ніжнім краю',
|
||||
align_center: 'Лінаваць па цэнтру',
|
||||
align_left: 'Па левым краю',
|
||||
align_middle: 'Выраўнаваць Блізкага',
|
||||
align_right: 'Па правым краю',
|
||||
align_top: 'Лінаваць па верхнім краю',
|
||||
mode_select: 'Выберыце інструмент',
|
||||
mode_fhpath: 'Pencil Tool',
|
||||
mode_line: 'Line Tool',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Свабоднай рукі Прастакутнік',
|
||||
mode_ellipse: 'Эліпс',
|
||||
mode_circle: 'Круг',
|
||||
mode_fhellipse: 'Свабоднай рукі Эліпс',
|
||||
mode_path: 'Poly Tool',
|
||||
mode_text: 'Тэкст Tool',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Адмяніць',
|
||||
redo: 'Паўтор',
|
||||
tool_source: 'Змяніць зыходны',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Група элементаў',
|
||||
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: 'Элементы Разгруппировать',
|
||||
docprops: 'Уласцівасці дакумента',
|
||||
move_bottom: 'Перамясціць уніз',
|
||||
move_top: 'Перамясціць угару',
|
||||
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: 'Захаваць',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Выдаліць слой',
|
||||
move_down: 'Перамясціць слой на',
|
||||
new: 'Новы слой',
|
||||
rename: 'Перайменаваць Слой',
|
||||
move_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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Выберыце прадвызначэньні:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_be;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_bg = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_bg = {
|
||||
lang: 'bg',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Спасявам',
|
||||
cancel: 'Отказ',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Кликнете, за да промени попълнете цвят, на смени, кликнете да променят цвета си удар',
|
||||
zoom_level: 'Промяна на ниво на мащабиране',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Промяна попълнете цвят',
|
||||
stroke_color: 'Промяна на инсулт цвят',
|
||||
stroke_style: 'Промяна на стила удар тире',
|
||||
stroke_width: 'Промяна на ширината инсулт',
|
||||
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',
|
||||
angle: 'Промяна ъгъл на завъртане',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Промяна на избрания елемент непрозрачност',
|
||||
circle_cx: 'CX Промяна кръг на координатната',
|
||||
circle_cy: 'Промяна кръг's CY координира',
|
||||
circle_r: 'Промяна кръг радиус',
|
||||
ellipse_cx: 'Промяна на елипса's CX координира',
|
||||
ellipse_cy: 'Промяна на елипса's CY координира',
|
||||
ellipse_rx: 'Промяна на елипса's X радиус',
|
||||
ellipse_ry: 'Промяна на елипса's Y радиус',
|
||||
line_x1: 'Промяна на линия, започваща х координира',
|
||||
line_x2: 'Промяна на линията приключва х координира',
|
||||
line_y1: 'Промяна линия, започваща Y координира',
|
||||
line_y2: 'Промяна на линията приключва Y координира',
|
||||
rect_height: 'Промяна на правоъгълник височина',
|
||||
rect_width: 'Промяна на правоъгълник ширина',
|
||||
corner_radius: 'Промяна на правоъгълник Corner Radius',
|
||||
image_width: 'Промяна на изображението ширина',
|
||||
image_height: 'Промяна на изображението височина',
|
||||
image_url: 'Промяна на URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Промяна на текст съдържание',
|
||||
font_family: 'Промяна на шрифта Семейство',
|
||||
font_size: 'Промени размера на буквите',
|
||||
bold: 'Получер текст',
|
||||
italic: 'Курсив текст'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Промяна на цвета на фона / непрозрачност',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Fit към съдържание',
|
||||
fit_to_all: 'Побери цялото съдържание',
|
||||
fit_to_canvas: 'Fit на платно',
|
||||
fit_to_layer_content: 'Fit да слой съдържание',
|
||||
fit_to_sel: 'Fit за подбор',
|
||||
align_relative_to: 'Привеждане в сравнение с ...',
|
||||
relativeTo: 'в сравнение с:',
|
||||
page: 'страница',
|
||||
largest_object: 'най-големият обект',
|
||||
selected_objects: 'избраните обекти',
|
||||
smallest_object: 'най-малката обект',
|
||||
new_doc: 'Ню Имидж',
|
||||
open_doc: 'Отворете изображението',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Save Image',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Привеждане Отдолу',
|
||||
align_center: 'Подравняване в средата',
|
||||
align_left: 'Подравняване вляво',
|
||||
align_middle: 'Привеждане в Близкия',
|
||||
align_right: 'Подравняване надясно',
|
||||
align_top: 'Привеждане Топ',
|
||||
mode_select: 'Select Tool',
|
||||
mode_fhpath: 'Pencil Tool',
|
||||
mode_line: 'Line Tool',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Свободен Употребявани правоъгълник',
|
||||
mode_ellipse: 'Елипса',
|
||||
mode_circle: 'Кръгът',
|
||||
mode_fhellipse: 'Свободен Употребявани Елипса',
|
||||
mode_path: 'Поли Tool',
|
||||
mode_text: 'Текст Оръдие',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Отмени',
|
||||
redo: 'Възстановяване',
|
||||
tool_source: 'Редактиране Източник',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Група Елементи',
|
||||
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: 'Разгрупирай Елементи',
|
||||
docprops: 'Document Properties',
|
||||
move_bottom: 'Премести надолу',
|
||||
move_top: 'Премести в началото',
|
||||
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: 'Спасявам',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Изтриване на слой',
|
||||
move_down: 'Move слой надолу',
|
||||
new: 'Нов слой',
|
||||
rename: 'Преименуване Layer',
|
||||
move_up: 'Move Up Layer',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Изберете предварително:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_bg;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_ca = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_ca = {
|
||||
lang: 'ca',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Salvar',
|
||||
cancel: 'Cancel',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Feu clic per canviar el color de farciment, shift-clic per canviar el color del traç',
|
||||
zoom_level: 'Canviar el nivell de zoom',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Canviar el color de farciment',
|
||||
stroke_color: 'Canviar el color del traç',
|
||||
stroke_style: 'Canviar estil de traç guió',
|
||||
stroke_width: 'Canviar l'amplada del traç',
|
||||
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',
|
||||
angle: 'Canviar l'angle de rotació',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Canviar la opacitat tema seleccionat',
|
||||
circle_cx: 'CX cercle Canvi de coordenades',
|
||||
circle_cy: 'Cercle Canvi CY coordinar',
|
||||
circle_r: 'Ràdio de cercle Canvi',
|
||||
ellipse_cx: 'Canviar lipse CX coordinar',
|
||||
ellipse_cy: 'Lipse Canvi CY coordinar',
|
||||
ellipse_rx: 'Ràdio x lipse Canvi',
|
||||
ellipse_ry: 'Ràdio i lipse Canvi',
|
||||
line_x1: 'Canviar la línia de partida de la coordenada x',
|
||||
line_x2: 'Canviar la línia d'hores de coordenada x',
|
||||
line_y1: 'Canviar la línia de partida i de coordinar',
|
||||
line_y2: 'Canviar la línia d'hores de coordenada',
|
||||
rect_height: 'Rectangle d'alçada Canvi',
|
||||
rect_width: 'Ample rectangle Canvi',
|
||||
corner_radius: 'Canviar Rectangle Corner Radius',
|
||||
image_width: 'Amplada de la imatge Canvi',
|
||||
image_height: 'Canviar l'altura de la imatge',
|
||||
image_url: 'Canviar URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Contingut del text',
|
||||
font_family: 'Canviar la font Família',
|
||||
font_size: 'Change Font Size',
|
||||
bold: 'Text en negreta',
|
||||
italic: 'Text en cursiva'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Color de fons / opacitat',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Ajustar al contingut',
|
||||
fit_to_all: 'Ajustar a tot el contingut',
|
||||
fit_to_canvas: 'Ajustar a la lona',
|
||||
fit_to_layer_content: 'Ajustar al contingut de la capa d'',
|
||||
fit_to_sel: 'Ajustar a la selecció',
|
||||
align_relative_to: 'Alinear pel que fa a ...',
|
||||
relativeTo: 'en relació amb:',
|
||||
page: 'Pàgina',
|
||||
largest_object: 'objecte més gran',
|
||||
selected_objects: 'objectes escollits',
|
||||
smallest_object: 'objecte més petit',
|
||||
new_doc: 'Nova imatge',
|
||||
open_doc: 'Obrir imatge',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Guardar imatge',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Alinear baix',
|
||||
align_center: 'Alinear al centre',
|
||||
align_left: 'Alinear a l'esquerra',
|
||||
align_middle: 'Alinear Medi',
|
||||
align_right: 'Alinear a la dreta',
|
||||
align_top: 'Alinear a dalt',
|
||||
mode_select: 'Eina de selecció',
|
||||
mode_fhpath: 'Eina Llapis',
|
||||
mode_line: 'L'eina',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rectangle',
|
||||
mode_ellipse: 'Lipse',
|
||||
mode_circle: 'Cercle',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Eina de text',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Desfés',
|
||||
redo: 'Refer',
|
||||
tool_source: 'Font Edita',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Elements de Grup de',
|
||||
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: 'Desagrupar elements',
|
||||
docprops: 'Propietats del document',
|
||||
move_bottom: 'Mou al final',
|
||||
move_top: 'Mou al principi',
|
||||
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: 'Salvar',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Eliminar capa',
|
||||
move_down: 'Mou la capa de Down',
|
||||
new: 'Nova capa',
|
||||
rename: 'Canvieu el nom de la capa',
|
||||
move_up: 'Mou la capa 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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Seleccioneu predefinides:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_ca;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_cs = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_cs = {
|
||||
lang: 'cs',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Uložit',
|
||||
cancel: 'Storno',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'šipka dolů',
|
||||
key_up: 'šipka nahoru',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Běží na'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Zobrazit/schovat více možností',
|
||||
palette_info: 'Kliknutím změníte barvu výplně, kliknutím současně s klávesou shift změníte barvu čáry',
|
||||
zoom_level: 'Změna přiblížení',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Změnit ID elementu',
|
||||
fill_color: 'Změnit barvu výplně',
|
||||
stroke_color: 'Změnit barvu čáry',
|
||||
stroke_style: 'Změnit styl čáry',
|
||||
stroke_width: 'Změnit šířku čáry',
|
||||
pos_x: 'Změnit souřadnici X',
|
||||
pos_y: 'Změnit souřadnici Y',
|
||||
linecap_butt: 'Konec úsečky: přesný',
|
||||
linecap_round: 'Konec úsečky: zaoblený',
|
||||
linecap_square: 'Konec úsečky: s čtvercovým přesahem',
|
||||
linejoin_bevel: 'Styl napojení úseček: zkosené',
|
||||
linejoin_miter: 'Styl napojení úseček: ostré',
|
||||
linejoin_round: 'Styl napojení úseček: oblé',
|
||||
angle: 'Změnit úhel natočení',
|
||||
blur: 'Změnit rozostření',
|
||||
opacity: 'Změnit průhlednost objektů',
|
||||
circle_cx: 'Změnit souřadnici X středu kružnice',
|
||||
circle_cy: 'Změnit souřadnici Y středu kružnice',
|
||||
circle_r: 'Změnit poloměr kružnice',
|
||||
ellipse_cx: 'Změnit souřadnici X středu elipsy',
|
||||
ellipse_cy: 'Změnit souřadnici Y středu elipsy',
|
||||
ellipse_rx: 'Změnit poloměr X elipsy',
|
||||
ellipse_ry: 'Změnit poloměr Y elipsy',
|
||||
line_x1: 'Změnit počáteční souřadnici X úsečky',
|
||||
line_x2: 'Změnit koncovou souřadnici X úsečky',
|
||||
line_y1: 'Změnit počáteční souřadnici Y úsečky',
|
||||
line_y2: 'Změnit koncovou souřadnici X úsečky',
|
||||
rect_height: 'Změnit výšku obdélníku',
|
||||
rect_width: 'Změnit šířku obdélníku',
|
||||
corner_radius: 'Změnit zaoblení obdélníku',
|
||||
image_width: 'Změnit šířku dokumentu',
|
||||
image_height: 'Změnit výšku dokumentu',
|
||||
image_url: 'Změnit adresu URL',
|
||||
node_x: 'Změnit souřadnici X uzlu',
|
||||
node_y: 'Změnit souřadnici Y uzlu',
|
||||
seg_type: 'Změnit typ segmentu',
|
||||
straight_segments: 'úsečka',
|
||||
curve_segments: 'křivka',
|
||||
text_contents: 'Změnit text',
|
||||
font_family: 'Změnit font',
|
||||
font_size: 'Změnit velikost písma',
|
||||
bold: 'Tučně',
|
||||
italic: 'Kurzíva'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Hlavní menu',
|
||||
bkgnd_color_opac: 'Změnit barvu a průhlednost pozadí',
|
||||
connector_no_arrow: 'Bez šipky',
|
||||
fitToContent: 'přizpůsobit obsahu',
|
||||
fit_to_all: 'Přizpůsobit veškerému obsahu',
|
||||
fit_to_canvas: 'Přizpůsobit stránce',
|
||||
fit_to_layer_content: 'Přizpůsobit obsahu vrstvy',
|
||||
fit_to_sel: 'Přizpůsobit výběru',
|
||||
align_relative_to: 'Zarovnat relativně',
|
||||
relativeTo: 'relatativně k:',
|
||||
page: 'stránce',
|
||||
largest_object: 'největšímu objektu',
|
||||
selected_objects: 'zvoleným objektům',
|
||||
smallest_object: 'nejmenšímu objektu',
|
||||
new_doc: 'Nový dokument',
|
||||
open_doc: 'Otevřít dokument',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Uložit dokument',
|
||||
import_doc: 'Importovat SVG',
|
||||
align_to_page: 'Zarovnat element na stránku',
|
||||
align_bottom: 'Zarovnat dolů',
|
||||
align_center: 'Zarovnat nastřed',
|
||||
align_left: 'Zarovnat doleva',
|
||||
align_middle: 'Zarovnat nastřed',
|
||||
align_right: 'Zarovnat doprava',
|
||||
align_top: 'Zarovnat nahoru',
|
||||
mode_select: 'Výběr a transformace objektů',
|
||||
mode_fhpath: 'Kresba od ruky',
|
||||
mode_line: 'Úsečka',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Obdélník volnou rukou',
|
||||
mode_ellipse: 'Elipsa',
|
||||
mode_circle: 'Kružnice',
|
||||
mode_fhellipse: 'Elipsa volnou rukou',
|
||||
mode_path: 'Křivka',
|
||||
mode_text: 'Text',
|
||||
mode_image: 'Obrázek',
|
||||
mode_zoom: 'Přiblížení',
|
||||
no_embed: 'POZOR: Obrázek nelze uložit s dokumentem. Bude zobrazován z adresáře, kde se nyní nachází.',
|
||||
undo: 'Zpět',
|
||||
redo: 'Znovu',
|
||||
tool_source: 'Upravovat SVG kód',
|
||||
wireframe_mode: 'Zobrazit jen kostru',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Seskupit objekty',
|
||||
make_link: 'Make (hyper)link',
|
||||
set_link_url: 'Set link URL (leave empty to remove)',
|
||||
to_path: 'Objekt na křivku',
|
||||
reorient_path: 'Změna orientace křivky',
|
||||
ungroup: 'Zrušit seskupení',
|
||||
docprops: 'Vlastnosti dokumentu',
|
||||
move_bottom: 'Vrstvu úplně dospodu',
|
||||
move_top: 'Vrstvu úplně nahoru',
|
||||
node_clone: 'Vložit nový uzel',
|
||||
node_delete: 'Ostranit uzel',
|
||||
node_link: 'Provázat ovládací body uzlu',
|
||||
add_subpath: 'Přidat další součást křivky',
|
||||
openclose_path: 'Otevřít/zavřít součást křivky',
|
||||
source_save: 'Uložit',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Vrstva',
|
||||
layers: 'Layers',
|
||||
del: 'Odstranit vrstvu',
|
||||
move_down: 'Přesunout vrstvu níž',
|
||||
new: 'Přidat vrstvu',
|
||||
rename: 'Přejmenovat vrstvu',
|
||||
move_up: 'Přesunout vrstvu výš',
|
||||
dupe: 'Duplicate Layer',
|
||||
merge_down: 'Merge Down',
|
||||
merge_all: 'Merge All',
|
||||
move_elems_to: 'Přesunout objekty do:',
|
||||
move_selected: 'Přesunout objekty do jiné vrstvy'
|
||||
},
|
||||
config: {
|
||||
image_props: 'Vlastnosti dokumentu',
|
||||
doc_title: 'Název',
|
||||
doc_dims: 'Vlastní velikost',
|
||||
included_images: 'Vložené obrázky',
|
||||
image_opt_embed: 'Vkládat do dokumentu',
|
||||
image_opt_ref: 'Jen odkazem',
|
||||
editor_prefs: 'Nastavení editoru',
|
||||
icon_size: 'Velikost ikon',
|
||||
language: 'Jazyk',
|
||||
background: 'Obrázek v pozadí editoru',
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: 'Pozor: obrázek v pozadí nebude uložen jako součást dokumentu.',
|
||||
icon_large: 'velké',
|
||||
icon_medium: 'střední',
|
||||
icon_small: 'malé',
|
||||
icon_xlarge: 'největší',
|
||||
select_predefined: 'vybrat předdefinovaný:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'Nevhodná hodnota',
|
||||
noContentToFitTo: 'Vyberte oblast pro přizpůsobení',
|
||||
dupeLayerName: 'Taková vrstva už bohužel existuje',
|
||||
enterUniqueLayerName: 'Zadejte prosím jedinečné jméno pro vrstvu',
|
||||
enterNewLayerName: 'Zadejte prosím jméno pro novou vrstvu',
|
||||
layerHasThatName: 'Vrstva už se tak jmenuje',
|
||||
QmoveElemsToLayer: "Opravdu chcete přesunout vybrané objekty do vrstvy '%s'?",
|
||||
QwantToClear: 'Opravdu chcete smazat současný dokument?\nHistorie změn bude také smazána.',
|
||||
QwantToOpen: 'Do you want to open a new file?\nThis will also erase your undo history!',
|
||||
QerrorsRevertToSource: 'Chyba v parsování zdrojového kódu SVG.\nChcete se vrátit k původnímu?',
|
||||
QignoreSourceChanges: 'Opravdu chcete stornovat změny provedené v SVG kódu?',
|
||||
featNotSupported: 'Tato vlastnost ještě není k dispozici',
|
||||
enterNewImgURL: 'Vložte adresu URL, na které se nachází vkládaný obrázek',
|
||||
defsFailOnSave: 'POZOR: Kvůli nedokonalosti Vašeho prohlížeče se mohou některé části dokumentu špatně vykreslovat (mohou chybět barevné přechody nebo některé objekty). Po uložení dokumentu by se ale vše mělo zobrazovat správně.',
|
||||
loadingImage: 'Nahrávám obrázek ...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
noteTheseIssues: 'Mohou se vyskytnout následující problémy: ',
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_cs;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_cy = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_cy = {
|
||||
lang: 'cy',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Cadw',
|
||||
cancel: 'Canslo',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Cliciwch yma i lenwi newid lliw, sifft-cliciwch i newid lliw strôc',
|
||||
zoom_level: 'Newid lefel chwyddo',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Newid lliw llenwi',
|
||||
stroke_color: 'Newid lliw strôc',
|
||||
stroke_style: 'Newid arddull strôc diferyn',
|
||||
stroke_width: 'Lled strôc Newid',
|
||||
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',
|
||||
angle: 'Ongl cylchdro Newid',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Newid dewis Didreiddiad eitem',
|
||||
circle_cx: 'CX Newid cylch yn cydlynu',
|
||||
circle_cy: 'Newid cylch's cy gydgysylltu',
|
||||
circle_r: 'Newid radiws cylch yn',
|
||||
ellipse_cx: 'Newid Ellipse yn CX gydgysylltu',
|
||||
ellipse_cy: 'Newid Ellipse yn cydlynu cy',
|
||||
ellipse_rx: 'Radiws Newid Ellipse's x',
|
||||
ellipse_ry: 'Radiws Newid Ellipse yn y',
|
||||
line_x1: 'Newid llinell yn cychwyn x gydgysylltu',
|
||||
line_x2: 'Newid llinell yn diweddu x gydgysylltu',
|
||||
line_y1: 'Newid llinell ar y cychwyn yn cydlynu',
|
||||
line_y2: 'Newid llinell yn dod i ben y gydgysylltu',
|
||||
rect_height: 'Uchder petryal Newid',
|
||||
rect_width: 'Lled petryal Newid',
|
||||
corner_radius: 'Newid Hirsgwâr Corner Radiws',
|
||||
image_width: 'Lled delwedd Newid',
|
||||
image_height: 'Uchder delwedd Newid',
|
||||
image_url: 'Newid URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Cynnwys testun Newid',
|
||||
font_family: 'Newid Font Teulu',
|
||||
font_size: 'Newid Maint Ffont',
|
||||
bold: 'Testun Bras',
|
||||
italic: 'Italig Testun'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Newid lliw cefndir / Didreiddiad',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Ffit i Cynnwys',
|
||||
fit_to_all: 'Yn addas i bawb content',
|
||||
fit_to_canvas: 'Ffit i ofyn',
|
||||
fit_to_layer_content: 'Ffit cynnwys haen i',
|
||||
fit_to_sel: 'Yn addas at ddewis',
|
||||
align_relative_to: 'Alinio perthynas i ...',
|
||||
relativeTo: 'cymharol i:',
|
||||
page: 'tudalen',
|
||||
largest_object: 'gwrthrych mwyaf',
|
||||
selected_objects: 'gwrthrychau etholedig',
|
||||
smallest_object: 'lleiaf gwrthrych',
|
||||
new_doc: 'Newydd Delwedd',
|
||||
open_doc: 'Delwedd Agored',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Cadw Delwedd',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Alinio Gwaelod',
|
||||
align_center: 'Alinio Center',
|
||||
align_left: 'Alinio Chwith',
|
||||
align_middle: 'Alinio Canol',
|
||||
align_right: 'Alinio Hawl',
|
||||
align_top: 'Alinio Top',
|
||||
mode_select: 'Dewiswch Offer',
|
||||
mode_fhpath: 'Teclyn pensil',
|
||||
mode_line: 'Llinell Offer',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Hand rhad ac am ddim Hirsgwâr',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Cylch',
|
||||
mode_fhellipse: 'Rhad ac am ddim Hand Ellipse',
|
||||
mode_path: 'Offer poly',
|
||||
mode_text: 'Testun Offer',
|
||||
mode_image: 'Offer Delwedd',
|
||||
mode_zoom: 'Offer Chwyddo',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Dadwneud',
|
||||
redo: 'Ail-wneud',
|
||||
tool_source: 'Golygu Ffynhonnell',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Elfennau Grŵp',
|
||||
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: 'Elfennau Ungroup',
|
||||
docprops: 'Document Eiddo',
|
||||
move_bottom: 'Symud i'r Gwaelod',
|
||||
move_top: 'Symud i'r Top',
|
||||
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: 'Cadw',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Dileu Haen',
|
||||
move_down: 'Symud Haen i Lawr',
|
||||
new: 'Haen Newydd',
|
||||
rename: 'Ail-enwi Haen',
|
||||
move_up: 'Symud Haen 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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Rhagosodol Dewis:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_cy;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_da = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_da = {
|
||||
lang: 'da',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Gemme',
|
||||
cancel: 'Annuller',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Klik for at ændre fyldfarve, shift-klik for at ændre stregfarve',
|
||||
zoom_level: 'Skift zoomniveau',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Skift fyldfarve',
|
||||
stroke_color: 'Skift stregfarve',
|
||||
stroke_style: 'Skift slagtilfælde Dash stil',
|
||||
stroke_width: 'Skift slagtilfælde bredde',
|
||||
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',
|
||||
angle: 'Skift rotationsvinkel',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Skift valgte element opacitet',
|
||||
circle_cx: 'Skift cirklens cx koordinere',
|
||||
circle_cy: 'Skift cirklens cy koordinere',
|
||||
circle_r: 'Skift cirklens radius',
|
||||
ellipse_cx: 'Skift ellipse's cx koordinere',
|
||||
ellipse_cy: 'Skift ellipse's cy koordinere',
|
||||
ellipse_rx: 'Skift ellipse's x radius',
|
||||
ellipse_ry: 'Skift ellipse's y radius',
|
||||
line_x1: 'Skift linie's start x-koordinat',
|
||||
line_x2: 'Skift Line's slutter x-koordinat',
|
||||
line_y1: 'Skift linjens start y-koordinat',
|
||||
line_y2: 'Skift Line's slutter y-koordinat',
|
||||
rect_height: 'Skift rektangel højde',
|
||||
rect_width: 'Skift rektanglets bredde',
|
||||
corner_radius: 'Skift Rektangel Corner Radius',
|
||||
image_width: 'Skift billede bredde',
|
||||
image_height: 'Skift billede højde',
|
||||
image_url: 'Skift webadresse',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Skift tekst indhold',
|
||||
font_family: 'Skift Font Family',
|
||||
font_size: 'Skift skriftstørrelse',
|
||||
bold: 'Fed tekst',
|
||||
italic: 'Italic Text'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Skift baggrundsfarve / uigennemsigtighed',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Tilpas til indhold',
|
||||
fit_to_all: 'Passer til alt indhold',
|
||||
fit_to_canvas: 'Tilpas til lærred',
|
||||
fit_to_layer_content: 'Tilpas til lag indhold',
|
||||
fit_to_sel: 'Tilpas til udvælgelse',
|
||||
align_relative_to: 'Juster i forhold til ...',
|
||||
relativeTo: 'i forhold til:',
|
||||
page: 'side',
|
||||
largest_object: 'største objekt',
|
||||
selected_objects: 'valgte objekter',
|
||||
smallest_object: 'mindste objekt',
|
||||
new_doc: 'Nyt billede',
|
||||
open_doc: 'Open SVG',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Gem billede',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Juster Bottom',
|
||||
align_center: 'Centrer',
|
||||
align_left: 'Venstrejusteret',
|
||||
align_middle: 'Juster Mellemøsten',
|
||||
align_right: 'Højrejusteret',
|
||||
align_top: 'Juster Top',
|
||||
mode_select: 'Select Tool',
|
||||
mode_fhpath: 'Pencil Tool',
|
||||
mode_line: 'Line Tool',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rektangel',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Cirkel',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Tekstværktøj',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Fortryd',
|
||||
redo: 'Redo',
|
||||
tool_source: 'Edit Source',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Gruppe Elements',
|
||||
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: 'Opdel Elements',
|
||||
docprops: 'Document Properties',
|
||||
move_bottom: 'Flyt til bund',
|
||||
move_top: 'Flyt til toppen',
|
||||
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: 'Gemme',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Slet Layer',
|
||||
move_down: 'Flyt lag ned',
|
||||
new: 'New Layer',
|
||||
rename: 'Omdøb Layer',
|
||||
move_up: 'Flyt 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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Vælg foruddefinerede:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_da;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_de = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_de = {
|
||||
lang: 'de',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'OK',
|
||||
cancel: 'Abbrechen',
|
||||
key_backspace: 'Rücktaste',
|
||||
key_del: 'Löschen',
|
||||
key_down: 'nach unten',
|
||||
key_up: 'nach oben',
|
||||
more_opts: 'Mehr Optionen',
|
||||
url: 'URL',
|
||||
width: 'Breite',
|
||||
height: 'Höhe'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Zeige/Verberge weitere Linien-Werkzeuge',
|
||||
palette_info: 'Klick zum Ändern der Füllfarbe, Shift-Klick zum Ändern der Linienfarbe',
|
||||
zoom_level: 'vergrößern',
|
||||
panel_drag: 'Nach links/rechts ziehen, um die Größe vom Seitenpanel zu ändern',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Element identifizieren',
|
||||
fill_color: 'Füllfarbe ändern',
|
||||
stroke_color: 'Linienfarbe ändern',
|
||||
stroke_style: 'Linienstil ändern',
|
||||
stroke_width: 'Linienbreite ändern',
|
||||
pos_x: 'Ändere die X-Koordinate',
|
||||
pos_y: 'Ändere die Y-Koordinate',
|
||||
linecap_butt: 'Form der Linienendung: Stumpf',
|
||||
linecap_round: 'Form der Linienendung: Rund',
|
||||
linecap_square: 'Form der Linienendung: Rechteckig',
|
||||
linejoin_bevel: 'Zusammentreffen von zwei Linien: abgeschrägte Kante',
|
||||
linejoin_miter: 'Zusammentreffen von zwei Linien: Gehrung',
|
||||
linejoin_round: 'Zusammentreffen von zwei Linien: Rund',
|
||||
angle: 'Drehwinkel ändern',
|
||||
blur: 'Ändere Wert des Gaußschen Weichzeichners',
|
||||
opacity: 'Opazität des ausgewählten Objekts ändern',
|
||||
circle_cx: 'Kreiszentrum (cx) ändern',
|
||||
circle_cy: 'Kreiszentrum (cy) ändern',
|
||||
circle_r: 'Kreisradius (r) ändern',
|
||||
ellipse_cx: 'Ellipsenzentrum (cx) ändern',
|
||||
ellipse_cy: 'Ellipsenzentrum (cy) ändern',
|
||||
ellipse_rx: 'Ellipsenradius (x) ändern',
|
||||
ellipse_ry: 'Ellipsenradius (y) ändern',
|
||||
line_x1: 'X-Koordinate des Linienanfangs ändern',
|
||||
line_x2: 'X-Koordinate des Linienendes ändern',
|
||||
line_y1: 'Y-Koordinate des Linienanfangs ändern',
|
||||
line_y2: 'Y-Koordinate des Linienendes ändern',
|
||||
rect_height: 'Höhe des Rechtecks ändern',
|
||||
rect_width: 'Breite des Rechtecks ändern',
|
||||
corner_radius: 'Eckenradius des Rechtecks ändern',
|
||||
image_width: 'Bildbreite ändern',
|
||||
image_height: 'Bildhöhe ändern',
|
||||
image_url: 'URL ändern',
|
||||
node_x: 'Ändere die X-Koordinate des Knoten',
|
||||
node_y: 'Ändere die Y-Koordinate des Knoten',
|
||||
seg_type: 'Ändere den Typ des Segments',
|
||||
straight_segments: 'Gerade',
|
||||
curve_segments: 'Kurve',
|
||||
text_contents: 'Textinhalt erstellen und bearbeiten',
|
||||
font_family: 'Schriftart wählen',
|
||||
font_size: 'Schriftgröße einstellen',
|
||||
bold: 'Fetter Text',
|
||||
italic: 'Kursiver Text'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Hauptmenü',
|
||||
bkgnd_color_opac: 'Hintergrundfarbe ändern / Opazität',
|
||||
connector_no_arrow: 'Kein Pfeil',
|
||||
fitToContent: 'An den Inhalt anpassen',
|
||||
fit_to_all: 'An gesamten Inhalt anpassen',
|
||||
fit_to_canvas: 'An die Zeichenfläche anpassen',
|
||||
fit_to_layer_content: 'An Inhalt der Ebene anpassen',
|
||||
fit_to_sel: 'An die Auswahl anpassen',
|
||||
align_relative_to: 'Relativ zu einem anderem Objekt ausrichten …',
|
||||
relativeTo: 'im Vergleich zu:',
|
||||
page: 'Seite',
|
||||
largest_object: 'größtes Objekt',
|
||||
selected_objects: 'gewählte Objekte',
|
||||
smallest_object: 'kleinstes Objekt',
|
||||
new_doc: 'Neues Bild',
|
||||
open_doc: 'Bild öffnen',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Bild speichern',
|
||||
import_doc: 'Importiere SVG',
|
||||
align_to_page: 'Element an Seite ausrichten',
|
||||
align_bottom: 'Unten ausrichten',
|
||||
align_center: 'Zentriert ausrichten',
|
||||
align_left: 'Linksbündig ausrichten',
|
||||
align_middle: 'In der Mitte ausrichten',
|
||||
align_right: 'Rechtsbündig ausrichten',
|
||||
align_top: 'Oben ausrichten',
|
||||
mode_select: 'Objekte auswählen und verändern',
|
||||
mode_fhpath: 'Freihandlinien zeichnen',
|
||||
mode_line: 'Linien zeichnen',
|
||||
mode_rect: 'Rechteck-Werkzeug',
|
||||
mode_square: 'Quadrat-Werkzeug',
|
||||
mode_fhrect: 'Freihand-Rechteck',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Kreis',
|
||||
mode_fhellipse: 'Freihand-Ellipse',
|
||||
mode_path: 'Pfad zeichnen',
|
||||
mode_text: 'Text erstellen und bearbeiten',
|
||||
mode_image: 'Bild einfügen',
|
||||
mode_zoom: 'Zoomfaktor vergrößern oder verringern',
|
||||
no_embed: 'Hinweis: Dieses Bild kann nicht eingebettet werden. Eine Anzeige hängt von diesem Pfad ab.',
|
||||
undo: 'Rückgängig',
|
||||
redo: 'Wiederherstellen',
|
||||
tool_source: 'Quellcode bearbeiten',
|
||||
wireframe_mode: 'Drahtmodell-Modus',
|
||||
clone: 'Element(e) klonen',
|
||||
del: 'Element(e) löschen',
|
||||
group_elements: 'Element(e) gruppieren',
|
||||
make_link: 'Link erstellen',
|
||||
set_link_url: 'Link setzen (leer lassen zum Entfernen)',
|
||||
to_path: 'Gewähltes Objekt in einen Pfad konvertieren',
|
||||
reorient_path: 'Neuausrichtung des Pfades',
|
||||
ungroup: 'Gruppierung aufheben',
|
||||
docprops: 'Dokument-Eigenschaften',
|
||||
move_bottom: 'Die gewählten Objekte nach ganz unten verschieben',
|
||||
move_top: 'Die gewählten Objekte nach ganz oben verschieben',
|
||||
node_clone: 'Klone den Knoten',
|
||||
node_delete: 'Lösche den Knoten',
|
||||
node_link: 'Gekoppelte oder separate Kontrollpunkte für die Bearbeitung des Pfades',
|
||||
add_subpath: 'Teilpfad hinzufügen',
|
||||
openclose_path: 'Öffne/Verbinde Unterpfad',
|
||||
source_save: 'Änderungen akzeptieren',
|
||||
cut: 'Ausschneiden',
|
||||
copy: 'Kopieren',
|
||||
paste: 'Einfügen',
|
||||
paste_in_place: 'Bei Originalposition einfügen',
|
||||
delete: 'Löschen',
|
||||
group: 'Gruppieren',
|
||||
move_front: 'Nach ganz oben verschieben',
|
||||
move_up: 'Hochschieben',
|
||||
move_down: 'Herunterschieben',
|
||||
move_back: 'Nach ganz unten verschieben'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Ebene',
|
||||
layers: 'Ebenen',
|
||||
del: 'Ebene löschen',
|
||||
move_down: 'Ebene nach unten verschieben',
|
||||
new: 'Neue Ebene',
|
||||
rename: 'Ebene umbenennen',
|
||||
move_up: 'Ebene nach oben verschieben',
|
||||
dupe: 'Ebene duplizieren',
|
||||
merge_down: 'Nach unten zusammenführen',
|
||||
merge_all: 'Alle zusammenführen',
|
||||
move_elems_to: 'Verschiebe ausgewählte Objekte:',
|
||||
move_selected: 'Verschiebe ausgewählte Objekte auf eine andere Ebene'
|
||||
},
|
||||
config: {
|
||||
image_props: 'Bildeigenschaften',
|
||||
doc_title: 'Titel',
|
||||
doc_dims: 'Dimension der Zeichenfläche',
|
||||
included_images: 'Eingefügte Bilder',
|
||||
image_opt_embed: 'Daten einbetten (lokale Dateien)',
|
||||
image_opt_ref: 'Benutze die Dateireferenz',
|
||||
editor_prefs: 'Editor-Einstellungen',
|
||||
icon_size: 'Symbol-Abmessungen',
|
||||
language: 'Sprache',
|
||||
background: 'Editor-Hintergrund',
|
||||
editor_img_url: 'Bild-URL',
|
||||
editor_bg_note: 'Anmerkung: Der Hintergrund wird mit dem Bild nicht gespeichert.',
|
||||
icon_large: 'Groß',
|
||||
icon_medium: 'Mittel',
|
||||
icon_small: 'Klein',
|
||||
icon_xlarge: 'Sehr Groß',
|
||||
select_predefined: 'Auswahl einer vordefinierten:',
|
||||
units_and_rulers: 'Einheiten und Lineale',
|
||||
show_rulers: 'Zeige Lineale',
|
||||
base_unit: 'Basiseinheit:',
|
||||
grid: 'Gitternetz',
|
||||
snapping_onoff: 'Einrasten an/aus',
|
||||
snapping_stepsize: 'Einrastabstand:',
|
||||
grid_color: 'Gitterfarbe'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'Fehlerhafter Wert',
|
||||
noContentToFitTo: 'Kein Inhalt anzupassen',
|
||||
dupeLayerName: 'Eine Ebene hat bereits diesen Namen',
|
||||
enterUniqueLayerName: 'Verwenden Sie einen eindeutigen Namen für die Ebene',
|
||||
enterNewLayerName: 'Geben Sie bitte einen neuen Namen für die Ebene ein',
|
||||
layerHasThatName: 'Eine Ebene hat bereits diesen Namen',
|
||||
QmoveElemsToLayer: "Verschiebe ausgewählte Objekte in die Ebene '%s'?",
|
||||
QwantToClear: 'Möchten Sie die Zeichnung löschen?\nDadurch wird auch die Rückgängig-Funktion zurückgesetzt!',
|
||||
QwantToOpen: 'Möchten Sie eine neue Datei öffnen?\nDadurch wird auch die Rückgängig-Funktion zurückgesetzt!',
|
||||
QerrorsRevertToSource: 'Es gibt Parser-Fehler in der SVG-Quelle.\nDie Original-SVG wiederherstellen?',
|
||||
QignoreSourceChanges: 'Sollen die Änderungen an der SVG-Quelle ignoriert werden?',
|
||||
featNotSupported: 'Diese Eigenschaft wird nicht unterstützt',
|
||||
enterNewImgURL: 'Geben Sie die URL für das neue Bild an',
|
||||
defsFailOnSave: 'Hinweis: Aufgrund eines Fehlers in Ihrem Browser kann dieses Bild falsch angezeigt werden (fehlende Gradienten oder Elemente). Es wird jedoch richtig angezeigt, sobald es gespeichert wird.',
|
||||
loadingImage: 'Bild wird geladen, bitte warten ...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
noteTheseIssues: 'Beachten Sie außerdem die folgenden Probleme: ',
|
||||
unsavedChanges: 'Es sind nicht-gespeicherte Änderungen vorhanden.',
|
||||
enterNewLinkURL: 'Geben Sie die neue URL ein',
|
||||
errorLoadingSVG: 'Fehler: Kann SVG-Daten nicht laden',
|
||||
URLloadFail: 'Kann von dieser URL nicht laden',
|
||||
retrieving: "Retrieving '%s' ...",
|
||||
popupWindowBlocked: 'Popup window may be blocked by browser',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_de;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_el = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_el = {
|
||||
lang: 'el',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Αποθηκεύω',
|
||||
cancel: 'Άκυρο',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Κάντε κλικ για να συμπληρώσετε την αλλαγή χρώματος, στροφή κλικ για να αλλάξετε το χρώμα εγκεφαλικό',
|
||||
zoom_level: 'Αλλαγή επίπεδο μεγέθυνσης',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Αλλαγή συμπληρώστε χρώμα',
|
||||
stroke_color: 'Αλλαγή χρώματος εγκεφαλικό',
|
||||
stroke_style: 'Αλλαγή στυλ παύλα εγκεφαλικό',
|
||||
stroke_width: 'Αλλαγή πλάτος γραμμής',
|
||||
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',
|
||||
angle: 'Αλλαγή γωνία περιστροφής',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Αλλαγή αδιαφάνεια επιλεγμένο σημείο',
|
||||
circle_cx: 'Cx Αλλαγή κύκλου συντονίζουν',
|
||||
circle_cy: 'Αλλαγή κύκλου cy συντονίζουν',
|
||||
circle_r: 'Αλλαγή ακτίνα κύκλου',
|
||||
ellipse_cx: 'Αλλαγή ellipse του CX συντονίζουν',
|
||||
ellipse_cy: 'Αλλαγή ellipse του cy συντονίζουν',
|
||||
ellipse_rx: 'X ακτίνα Αλλαγή ellipse του',
|
||||
ellipse_ry: 'Y ακτίνα Αλλαγή ellipse του',
|
||||
line_x1: 'Αλλαγή γραμμής εκκίνησης x συντονίζουν',
|
||||
line_x2: 'Αλλαγή γραμμής λήγει x συντονίζουν',
|
||||
line_y1: 'Αλλαγή γραμμής εκκίνησης y συντονίζουν',
|
||||
line_y2: 'Αλλαγή γραμμής λήγει y συντονίζουν',
|
||||
rect_height: 'Αλλαγή ύψος ορθογωνίου',
|
||||
rect_width: 'Αλλαγή πλάτους ορθογώνιο',
|
||||
corner_radius: 'Αλλαγή ορθογώνιο Corner Radius',
|
||||
image_width: 'Αλλαγή πλάτος εικόνας',
|
||||
image_height: 'Αλλαγή ύψος εικόνας',
|
||||
image_url: 'Αλλαγή URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Αλλαγή περιεχόμενο κειμένου',
|
||||
font_family: 'Αλλαγή γραμματοσειράς Οικογένεια',
|
||||
font_size: 'Αλλαγή μεγέθους γραμματοσειράς',
|
||||
bold: 'Bold Text',
|
||||
italic: 'Πλάγιους'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Αλλαγή χρώματος φόντου / αδιαφάνεια',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Fit to Content',
|
||||
fit_to_all: 'Ταιριάζει σε όλο το περιεχόμενο',
|
||||
fit_to_canvas: 'Προσαρμογή στο μουσαμά',
|
||||
fit_to_layer_content: 'Προσαρμογή στο περιεχόμενο στρώμα',
|
||||
fit_to_sel: 'Fit to επιλογή',
|
||||
align_relative_to: 'Στοίχιση σε σχέση με ...',
|
||||
relativeTo: 'σε σχέση με:',
|
||||
page: 'σελίδα',
|
||||
largest_object: 'μεγαλύτερο αντικείμενο',
|
||||
selected_objects: 'εκλέγεται αντικείμενα',
|
||||
smallest_object: 'μικρότερο αντικείμενο',
|
||||
new_doc: 'Νέα εικόνα',
|
||||
open_doc: 'Άνοιγμα εικόνας',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Αποθήκευση εικόνας',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Στοίχισηκάτω',
|
||||
align_center: 'Στοίχισηστοκέντρο',
|
||||
align_left: 'Στοίχισηαριστερά',
|
||||
align_middle: 'Ευθυγράμμιση Μέση',
|
||||
align_right: 'Στοίχισηδεξιά',
|
||||
align_top: 'Στοίχισηπάνω',
|
||||
mode_select: 'Select Tool',
|
||||
mode_fhpath: 'Εργαλείομολυβιού',
|
||||
mode_line: 'Line Tool',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Δωρεάν-Hand ορθογώνιο',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Κύκλος',
|
||||
mode_fhellipse: 'Δωρεάν-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Κείμενο Tool',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Αναίρεση',
|
||||
redo: 'Redo',
|
||||
tool_source: 'Επεξεργασία Πηγή',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Ομάδα Στοιχεία',
|
||||
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: 'Κατάργηση ομαδοποίησης Στοιχεία',
|
||||
docprops: 'Ιδιότητες εγγράφου',
|
||||
move_bottom: 'Μετακίνηση προς τα κάτω',
|
||||
move_top: 'Μετακίνηση στην αρχή',
|
||||
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: 'Αποθηκεύω',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Διαγραφήστρώματος',
|
||||
move_down: 'Μετακίνηση Layer Down',
|
||||
new: 'Νέο Layer',
|
||||
rename: 'Μετονομασία Layer',
|
||||
move_up: 'Μετακίνηση 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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Επιλογή προκαθορισμένων:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_el;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_en = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_en = {
|
||||
lang: 'en',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'OK',
|
||||
cancel: 'Cancel',
|
||||
key_backspace: 'Backspace',
|
||||
key_del: 'Del',
|
||||
key_down: 'Down',
|
||||
key_up: 'Up',
|
||||
more_opts: 'More options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
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',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
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',
|
||||
angle: 'Change rotation angle',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Change selected item 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",
|
||||
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',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Change text contents',
|
||||
font_family: 'Change Font Family',
|
||||
font_size: 'Change Font Size',
|
||||
bold: 'Bold Text [B]',
|
||||
italic: 'Italic Text [I]'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Change background color/opacity',
|
||||
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:',
|
||||
page: 'page',
|
||||
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_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rectangle',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Circle',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Text Tool',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool [Ctrl+Up/Down]',
|
||||
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]',
|
||||
clone: 'Duplicate Element(s) [D]',
|
||||
del: 'Delete Element(s) [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]',
|
||||
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 [ Ctrl-Shift+] ]',
|
||||
move_up: 'Bring Forward [ Ctrl+] ]',
|
||||
move_down: 'Send Backward [ Ctrl+[ ]',
|
||||
move_back: 'Send to Back [ Ctrl+Shift+[ ]'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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:'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_en;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_es = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_es = {
|
||||
lang: 'es',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'OK',
|
||||
cancel: 'Cancelar',
|
||||
key_backspace: 'retroceso',
|
||||
key_del: 'suprimir',
|
||||
key_down: 'abajo',
|
||||
key_up: 'arriba',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Mostrar/ocultar herramientas de trazo adicionales',
|
||||
palette_info: 'Haga clic para cambiar el color de relleno. Pulse Mayús y haga clic para cambiar el color del contorno.',
|
||||
zoom_level: 'Cambiar el nivel de zoom',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Cambiar el color de relleno',
|
||||
stroke_color: 'Cambiar el color del contorno',
|
||||
stroke_style: 'Cambiar el estilo del trazo del contorno',
|
||||
stroke_width: 'Cambiar el grosor del contorno',
|
||||
pos_x: 'Cambiar la posición horizontal X',
|
||||
pos_y: 'Cambiar la posición vertical Y',
|
||||
linecap_butt: 'Final de la línea: en el nodo',
|
||||
linecap_round: 'Final de la línea: redondeada',
|
||||
linecap_square: 'Final de la línea: cuadrada',
|
||||
linejoin_bevel: 'Unión: biselada',
|
||||
linejoin_miter: 'Unión: recta',
|
||||
linejoin_round: 'Unión: redondeada',
|
||||
angle: 'Cambiar ángulo de rotación',
|
||||
blur: 'Ajustar desenfoque gausiano',
|
||||
opacity: 'Cambiar la opacidad del objeto seleccionado',
|
||||
circle_cx: 'Cambiar la posición horizonral CX del círculo',
|
||||
circle_cy: 'Cambiar la posición vertical CY del círculo',
|
||||
circle_r: 'Cambiar el radio del círculo',
|
||||
ellipse_cx: 'Cambiar la posición horizontal CX de la elipse',
|
||||
ellipse_cy: 'Cambiar la posición vertical CY de la elipse',
|
||||
ellipse_rx: 'Cambiar el radio horizontal X de la elipse',
|
||||
ellipse_ry: 'Cambiar el radio vertical Y de la elipse',
|
||||
line_x1: 'Cambiar la posición horizontal X del comienzo de la línea',
|
||||
line_x2: 'Cambiar la posición horizontal X del final de la línea',
|
||||
line_y1: 'Cambiar la posición vertical Y del comienzo de la línea',
|
||||
line_y2: 'Cambiar la posición vertical Y del final de la línea',
|
||||
rect_height: 'Cambiar la altura del rectángulo',
|
||||
rect_width: 'Cambiar el ancho rectángulo',
|
||||
corner_radius: 'Cambiar el radio de las esquinas del rectángulo',
|
||||
image_width: 'Cambiar el ancho de la imagen',
|
||||
image_height: 'Cambiar la altura de la imagen',
|
||||
image_url: 'Modificar URL',
|
||||
node_x: 'Cambiar la posición horizontal X del nodo',
|
||||
node_y: 'Cambiar la posición vertical Y del nodo',
|
||||
seg_type: 'Cambiar el tipo de segmento',
|
||||
straight_segments: 'Recta',
|
||||
curve_segments: 'Curva',
|
||||
text_contents: 'Modificar el texto',
|
||||
font_family: 'Tipo de fuente',
|
||||
font_size: 'Tamaño de la fuente',
|
||||
bold: 'Texto en negrita',
|
||||
italic: 'Texto en cursiva'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Menú principal',
|
||||
bkgnd_color_opac: 'Cambiar color de fondo / opacidad',
|
||||
connector_no_arrow: 'Sin flecha',
|
||||
fitToContent: 'Ajustar al contenido',
|
||||
fit_to_all: 'Ajustar a todo el contenido',
|
||||
fit_to_canvas: 'Ajustar al lienzo',
|
||||
fit_to_layer_content: 'Ajustar al contenido de la capa',
|
||||
fit_to_sel: 'Ajustar a la selección',
|
||||
align_relative_to: 'Alinear con respecto a ...',
|
||||
relativeTo: 'en relación con:',
|
||||
page: 'Página',
|
||||
largest_object: 'El objeto más grande',
|
||||
selected_objects: 'Objetos seleccionados',
|
||||
smallest_object: 'El objeto más pequeño',
|
||||
new_doc: 'Nueva imagen',
|
||||
open_doc: 'Abrir imagen',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Guardar imagen',
|
||||
import_doc: 'Importar un archivo SVG',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Alinear parte inferior',
|
||||
align_center: 'Centrar verticalmente',
|
||||
align_left: 'Alinear lado izquierdo',
|
||||
align_middle: 'Centrar horizontalmente',
|
||||
align_right: 'Alinear lado derecho',
|
||||
align_top: 'Alinear parte superior',
|
||||
mode_select: 'Herramienta de selección',
|
||||
mode_fhpath: 'Herramienta de lápiz',
|
||||
mode_line: 'Trazado de líneas',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Rectángulo a mano alzada',
|
||||
mode_ellipse: 'Elipse',
|
||||
mode_circle: 'Círculo',
|
||||
mode_fhellipse: 'Elipse a mano alzada',
|
||||
mode_path: 'Herramienta de trazado',
|
||||
mode_text: 'Insertar texto',
|
||||
mode_image: 'Insertar imagen',
|
||||
mode_zoom: 'Zoom',
|
||||
no_embed: 'NOTA: La imagen no puede ser integrada. El contenido mostrado dependerá de la imagen ubicada en esta ruta. ',
|
||||
undo: 'Deshacer',
|
||||
redo: 'Rehacer',
|
||||
tool_source: 'Editar código fuente',
|
||||
wireframe_mode: 'Modo marco de alambre',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Agrupar objetos',
|
||||
make_link: 'Make (hyper)link',
|
||||
set_link_url: 'Set link URL (leave empty to remove)',
|
||||
to_path: 'Convertir a trazado',
|
||||
reorient_path: 'Reorientar el trazado',
|
||||
ungroup: 'Desagrupar objetos',
|
||||
docprops: 'Propiedades del documento',
|
||||
move_bottom: 'Mover abajo',
|
||||
move_top: 'Mover arriba',
|
||||
node_clone: 'Clonar nodo',
|
||||
node_delete: 'Suprimir nodo',
|
||||
node_link: 'Enlazar puntos de control',
|
||||
add_subpath: 'Añadir subtrazado',
|
||||
openclose_path: 'Open/close sub-path',
|
||||
source_save: 'Aplicar cambios',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Capa',
|
||||
layers: 'Layers',
|
||||
del: 'Suprimir capa',
|
||||
move_down: 'Mover la capa hacia abajo',
|
||||
new: 'Nueva capa',
|
||||
rename: 'Renombrar capa',
|
||||
move_up: 'Mover la capa hacia arriba',
|
||||
dupe: 'Duplicate Layer',
|
||||
merge_down: 'Merge Down',
|
||||
merge_all: 'Merge All',
|
||||
move_elems_to: 'Desplazar objetos a:',
|
||||
move_selected: 'Mover los objetos seleccionados a otra capa'
|
||||
},
|
||||
config: {
|
||||
image_props: 'Propiedades de la Imagen',
|
||||
doc_title: 'Título',
|
||||
doc_dims: 'Tamaño del lienzo',
|
||||
included_images: 'Imágenes integradas',
|
||||
image_opt_embed: 'Integrar imágenes en forma de datos (archivos locales)',
|
||||
image_opt_ref: 'Usar la referencia del archivo',
|
||||
editor_prefs: 'Preferencias del Editor',
|
||||
icon_size: 'Tamaño de los iconos',
|
||||
language: 'Idioma',
|
||||
background: 'Fondo del editor',
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: 'Nota: El fondo no se guardará junto con la imagen.',
|
||||
icon_large: 'Grande',
|
||||
icon_medium: 'Mediano',
|
||||
icon_small: 'Pequeño',
|
||||
icon_xlarge: 'Muy grande',
|
||||
select_predefined: 'Seleccionar predefinido:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'Valor no válido',
|
||||
noContentToFitTo: 'No existe un contenido al que ajustarse.',
|
||||
dupeLayerName: '¡Ya existe una capa con este nombre!',
|
||||
enterUniqueLayerName: 'Introduzca otro nombre distinto para la capa.',
|
||||
enterNewLayerName: 'Introduzca el nuevo nombre de la capa.',
|
||||
layerHasThatName: 'El nombre introducido es el nombre actual de la capa.',
|
||||
QmoveElemsToLayer: "¿Desplazar los elementos seleccionados a la capa '%s'?",
|
||||
QwantToClear: '¿Desea borrar el dibujo?\n¡El historial de acciones también se borrará!',
|
||||
QwantToOpen: 'Do you want to open a new file?\nThis will also erase your undo history!',
|
||||
QerrorsRevertToSource: 'Existen errores sintácticos en su código fuente SVG.\n¿Desea volver al código fuente SVG original?',
|
||||
QignoreSourceChanges: '¿Desea ignorar los cambios realizados sobre el código fuente SVG?',
|
||||
featNotSupported: 'Función no compatible.',
|
||||
enterNewImgURL: 'Introduzca la nueva URL de la imagen.',
|
||||
defsFailOnSave: 'NOTA: Debido a un fallo de su navegador, es posible que la imagen aparezca de forma incorrecta (ciertas gradaciones o elementos podría perderse). La imagen aparecerá en su forma correcta una vez guardada.',
|
||||
loadingImage: 'Cargando imagen. Espere, por favor.',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
noteTheseIssues: 'Existen además los problemas siguientes:',
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_es;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_et = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_et = {
|
||||
lang: 'et',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Salvestama',
|
||||
cancel: 'Tühista',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Click muuta täitke värvi, Shift-nuppu, et muuta insult värvi',
|
||||
zoom_level: 'Muuda suumi taset',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Muuda täitke värvi',
|
||||
stroke_color: 'Muuda insult värvi',
|
||||
stroke_style: 'Muuda insult kriips stiil',
|
||||
stroke_width: 'Muuda insult laius',
|
||||
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',
|
||||
angle: 'Muuda Pöördenurk',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Muuda valitud elemendi läbipaistmatus',
|
||||
circle_cx: 'Muuda ringi's cx kooskõlastada',
|
||||
circle_cy: 'Muuda ringi's cy kooskõlastada',
|
||||
circle_r: 'Muuda ring on raadiusega',
|
||||
ellipse_cx: 'Muuda ellips's cx kooskõlastada',
|
||||
ellipse_cy: 'Muuda ellips's cy kooskõlastada',
|
||||
ellipse_rx: 'Muuda ellips's x raadius',
|
||||
ellipse_ry: 'Muuda ellips's y raadius',
|
||||
line_x1: 'Muuda rööbastee algab x-koordinaadi',
|
||||
line_x2: 'Muuda Line lõpeb x-koordinaadi',
|
||||
line_y1: 'Muuda rööbastee algab y-koordinaadi',
|
||||
line_y2: 'Muuda Line lõppenud y-koordinaadi',
|
||||
rect_height: 'Muuda ristküliku kõrgus',
|
||||
rect_width: 'Muuda ristküliku laius',
|
||||
corner_radius: 'Muuda ristkülik Nurgakabe Raadius',
|
||||
image_width: 'Muuda pilt laius',
|
||||
image_height: 'Muuda pilt kõrgus',
|
||||
image_url: 'Change URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Muuda teksti sisu',
|
||||
font_family: 'Muutke Kirjasinperhe',
|
||||
font_size: 'Change font size',
|
||||
bold: 'Rasvane kiri',
|
||||
italic: 'Kursiiv'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Muuda tausta värvi / läbipaistmatus',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Fit to Content',
|
||||
fit_to_all: 'Sobita kogu sisu',
|
||||
fit_to_canvas: 'Sobita lõuend',
|
||||
fit_to_layer_content: 'Sobita kiht sisu',
|
||||
fit_to_sel: 'Fit valiku',
|
||||
align_relative_to: 'Viia võrreldes ...',
|
||||
relativeTo: 'võrreldes:',
|
||||
page: 'lehekülg',
|
||||
largest_object: 'suurim objekt',
|
||||
selected_objects: 'valitud objektide',
|
||||
smallest_object: 'väikseim objekt',
|
||||
new_doc: 'Uus pilt',
|
||||
open_doc: 'Pildi avamine',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Salvesta pilt',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Viia Bottom',
|
||||
align_center: 'Keskele joondamine',
|
||||
align_left: 'Vasakjoondus',
|
||||
align_middle: 'Viia Lähis -',
|
||||
align_right: 'Paremjoondus',
|
||||
align_top: 'Viia Üles',
|
||||
mode_select: 'Vali Tool',
|
||||
mode_fhpath: 'Pencil Tool',
|
||||
mode_line: 'Line Tool',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Online-Hand Ristkülik',
|
||||
mode_ellipse: 'Ellips',
|
||||
mode_circle: 'Circle',
|
||||
mode_fhellipse: 'Online-Hand Ellips',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Tekst Tool',
|
||||
mode_image: 'Pilt Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Undo',
|
||||
redo: 'Redo',
|
||||
tool_source: 'Muuda Allikas',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Rühma elemendid',
|
||||
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: 'Lõhu Elements',
|
||||
docprops: 'Dokumendi omadused',
|
||||
move_bottom: 'Liiguta alla',
|
||||
move_top: 'Liiguta üles',
|
||||
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: 'Salvestama',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Kustuta Kiht',
|
||||
move_down: 'Liiguta kiht alla',
|
||||
new: 'Uus kiht',
|
||||
rename: 'Nimeta kiht',
|
||||
move_up: 'Liiguta kiht üles',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Valige eelmääratletud:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_et;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_fa = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_fa = {
|
||||
lang: 'fa',
|
||||
dir: 'rtl',
|
||||
common: {
|
||||
ok: 'تأیید',
|
||||
cancel: 'لغو',
|
||||
key_backspace: 'پس بر ',
|
||||
key_del: 'حذف ',
|
||||
key_down: 'پایین ',
|
||||
key_up: 'بالا ',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'برای تغییر رنگ، کلیک کنید. برای تغییر رنگ لبه، کلید تبدیل (shift) را فشرده و کلیک کنید',
|
||||
zoom_level: 'تغییر بزرگ نمایی',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'تغییر رنگ',
|
||||
stroke_color: 'تغییر رنگ لبه',
|
||||
stroke_style: 'تغییر نقطه چین لبه',
|
||||
stroke_width: 'تغییر عرض لبه',
|
||||
pos_x: 'تغییر مختصات X',
|
||||
pos_y: 'تغییر مختصات Y',
|
||||
linecap_butt: 'Linecap: Butt',
|
||||
linecap_round: 'Linecap: Round',
|
||||
linecap_square: 'Linecap: Square',
|
||||
linejoin_bevel: 'Linejoin: Bevel',
|
||||
linejoin_miter: 'Linejoin: Miter',
|
||||
linejoin_round: 'Linejoin: Round',
|
||||
angle: 'تغییر زاویه چرخش',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'تغییر تاری عنصر انتخاب شده',
|
||||
circle_cx: 'تغییر مختصات cx دایره',
|
||||
circle_cy: 'تغییر مختصات cy دایره',
|
||||
circle_r: 'تغییر شعاع دایره',
|
||||
ellipse_cx: 'تغییر مختصات cx بیضی',
|
||||
ellipse_cy: 'تغییر مختصات cy بیضی',
|
||||
ellipse_rx: 'تغییر شعاع rx بیضی',
|
||||
ellipse_ry: 'تغییر شعاع ry بیضی',
|
||||
line_x1: 'تغییر مختصات x آغاز خط',
|
||||
line_x2: 'تغییر مختصات x پایان خط',
|
||||
line_y1: 'تغییر مختصات y آغاز خط',
|
||||
line_y2: 'تغییر مختصات y پایان خط',
|
||||
rect_height: 'تغییر ارتفاع مستطیل',
|
||||
rect_width: 'تغییر عرض مستطیل',
|
||||
corner_radius: 'شعاع گوشه:',
|
||||
image_width: 'تغییر عرض تصویر',
|
||||
image_height: 'تغییر ارتفاع تصویر',
|
||||
image_url: 'تغییر نشانی وب (url)',
|
||||
node_x: 'تغییر مختصات x نقطه',
|
||||
node_y: 'تغییر مختصات y نقطه',
|
||||
seg_type: 'تغییر نوع قطعه (segment)',
|
||||
straight_segments: 'مستقیم',
|
||||
curve_segments: 'منحنی',
|
||||
text_contents: 'تغییر محتویات متن',
|
||||
font_family: 'تغییر خانواده قلم',
|
||||
font_size: 'تغییر اندازه قلم',
|
||||
bold: 'متن توپر ',
|
||||
italic: 'متن کج '
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'تغییر رنگ پس زمینه / تاری',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'هم اندازه شدن با محتوا',
|
||||
fit_to_all: 'هم اندازه شدن با همه محتویات',
|
||||
fit_to_canvas: 'هم اندازه شدن با صفحه مجازی (بوم)',
|
||||
fit_to_layer_content: 'هم اندازه شدن با محتوای لایه',
|
||||
fit_to_sel: 'هم اندازه شدن با اشیاء انتخاب شده',
|
||||
align_relative_to: 'تراز نسبت به ...',
|
||||
relativeTo: 'نسبت به:',
|
||||
page: 'صفحه',
|
||||
largest_object: 'بزرگترین شئ',
|
||||
selected_objects: 'اشیاء انتخاب شده',
|
||||
smallest_object: 'کوچکترین شئ',
|
||||
new_doc: 'تصویر جدید ',
|
||||
open_doc: 'باز کردن تصویر ',
|
||||
export_img: 'Export',
|
||||
save_doc: 'ذخیره تصویر ',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'تراز پایین',
|
||||
align_center: 'وسط چین',
|
||||
align_left: 'چپ چین',
|
||||
align_middle: 'تراز میانه',
|
||||
align_right: 'راست چین',
|
||||
align_top: 'تراز بالا',
|
||||
mode_select: 'ابزار انتخاب ',
|
||||
mode_fhpath: 'ابزار مداد ',
|
||||
mode_line: 'ابزار خط ',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'مستطیل با قابلیت تغییر پویا',
|
||||
mode_ellipse: 'بیضی',
|
||||
mode_circle: 'دایره',
|
||||
mode_fhellipse: 'بیضی با قابلیت تغییر پویا',
|
||||
mode_path: 'ابزار مسیر ',
|
||||
mode_text: 'ابزار متن ',
|
||||
mode_image: 'ابزار تصویر ',
|
||||
mode_zoom: 'ابزار بزرگ نمایی ',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'واگرد ',
|
||||
redo: 'ازنو ',
|
||||
tool_source: 'ویرایش منبع ',
|
||||
wireframe_mode: 'حالت نمایش لبه ها ',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'قرار دادن عناصر در گروه ',
|
||||
make_link: 'Make (hyper)link',
|
||||
set_link_url: 'Set link URL (leave empty to remove)',
|
||||
to_path: 'تبدیل به مسیر',
|
||||
reorient_path: 'جهت دهی مجدد مسیر',
|
||||
ungroup: 'خارج کردن عناصر از گروه ',
|
||||
docprops: 'مشخصات سند ',
|
||||
move_bottom: 'انتقال به پایین ترین ',
|
||||
move_top: 'انتقال به بالاترین ',
|
||||
node_clone: 'ایجاد کپی از نقطه',
|
||||
node_delete: 'حذف نقطه',
|
||||
node_link: 'پیوند دادن نقاط کنترل',
|
||||
add_subpath: 'Add sub-path',
|
||||
openclose_path: 'Open/close sub-path',
|
||||
source_save: 'اعمال تغییرات',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'حذف',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'لایه',
|
||||
layers: 'Layers',
|
||||
del: 'حذف لایه',
|
||||
move_down: 'انتقال لایه به پایین',
|
||||
new: 'لایه جدید',
|
||||
rename: 'تغییر نام لایه',
|
||||
move_up: 'انتقال لایه به بالا',
|
||||
dupe: 'Duplicate Layer',
|
||||
merge_down: 'Merge Down',
|
||||
merge_all: 'Merge All',
|
||||
move_elems_to: 'انتقال عناصر به:',
|
||||
move_selected: 'انتقال عناصر انتخاب شده به یک لایه متفاوت'
|
||||
},
|
||||
config: {
|
||||
image_props: 'مشخصات تصویر',
|
||||
doc_title: 'عنوان',
|
||||
doc_dims: 'ابعاد صفحه مجازی (بوم)',
|
||||
included_images: 'تصاویر گنجانده شده',
|
||||
image_opt_embed: 'داده های جای داده شده (پرونده های محلی)',
|
||||
image_opt_ref: 'استفاده از ارجاع به پرونده',
|
||||
editor_prefs: 'تنظیمات ویراستار',
|
||||
icon_size: 'اندازه شمایل',
|
||||
language: 'زبان',
|
||||
background: 'پس زمینه ویراستار',
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: 'توجه: پس زمینه همراه تصویر ذخیره نخواهد شد.',
|
||||
icon_large: 'بزرگ',
|
||||
icon_medium: 'متوسط',
|
||||
icon_small: 'کوچک',
|
||||
icon_xlarge: 'خیلی بزرگ',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'مقدار داده شده نامعتبر است',
|
||||
noContentToFitTo: 'محتوایی برای هم اندازه شدن وجود ندارد',
|
||||
dupeLayerName: 'لایه ای با آن نام وجود دارد!',
|
||||
enterUniqueLayerName: 'لطفا یک نام لایه یکتا انتخاب کنید',
|
||||
enterNewLayerName: 'لطفا نام لایه جدید را وارد کنید',
|
||||
layerHasThatName: 'لایه از قبل آن نام را دارد',
|
||||
QmoveElemsToLayer: "عناصر انتخاب شده به لایه '%s' منتقل شوند؟",
|
||||
QwantToClear: 'آیا مطمئن هستید که می خواهید نقاشی را پاک کنید؟\nاین عمل باعث حذف تاریخچه واگرد شما خواهد شد!',
|
||||
QwantToOpen: 'Do you want to open a new file?\nThis will also erase your undo history!',
|
||||
QerrorsRevertToSource: 'در منبع SVG شما خطاهای تجزیه (parse) وجود داشت.\nبه منبع SVG اصلی بازگردانده شود؟',
|
||||
QignoreSourceChanges: 'تغییرات اعمال شده در منبع SVG نادیده گرفته شوند؟',
|
||||
featNotSupported: 'این ویژگی پشتیبانی نشده است',
|
||||
enterNewImgURL: 'نشانی وب (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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_fa;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_fi = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_fi = {
|
||||
lang: 'fi',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Tallentaa',
|
||||
cancel: 'Peruuta',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Klikkaa muuttaa täyttöväri, Shift-click vaihtaa aivohalvauksen väriä',
|
||||
zoom_level: 'Muuta suurennustaso',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Muuta täyttöväri',
|
||||
stroke_color: 'Muuta aivohalvaus väri',
|
||||
stroke_style: 'Muuta aivohalvaus Dash tyyli',
|
||||
stroke_width: 'Muuta aivohalvaus leveys',
|
||||
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',
|
||||
angle: 'Muuta kiertokulma',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Muuta valitun kohteen läpinäkyvyys',
|
||||
circle_cx: 'Muuta Circlen CX koordinoida',
|
||||
circle_cy: 'Muuta Circlen CY koordinoida',
|
||||
circle_r: 'Muuta ympyrän säde',
|
||||
ellipse_cx: 'Muuta ellipsi's CX koordinoida',
|
||||
ellipse_cy: 'Muuta ellipsi's CY koordinoida',
|
||||
ellipse_rx: 'Muuta ellipsi's x säde',
|
||||
ellipse_ry: 'Muuta ellipsi n y säde',
|
||||
line_x1: 'Muuta Linen alkaa x-koordinaatti',
|
||||
line_x2: 'Muuta Linen päättyy x koordinoida',
|
||||
line_y1: 'Muuta Linen alkaa y-koordinaatti',
|
||||
line_y2: 'Muuta Linen päättyy y koordinoida',
|
||||
rect_height: 'Muuta suorakaiteen korkeus',
|
||||
rect_width: 'Muuta suorakaiteen leveys',
|
||||
corner_radius: 'Muuta suorakaide Corner Säde',
|
||||
image_width: 'Muuta kuvan leveys',
|
||||
image_height: 'Muuta kuvan korkeus',
|
||||
image_url: 'Muuta URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Muuta tekstin sisältö',
|
||||
font_family: 'Muuta Font Family',
|
||||
font_size: 'Muuta fontin kokoa',
|
||||
bold: 'Lihavoitu teksti',
|
||||
italic: 'Kursivoitu'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Vaihda taustaväri / sameuden',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Sovita Content',
|
||||
fit_to_all: 'Sovita kaikki content',
|
||||
fit_to_canvas: 'Sovita kangas',
|
||||
fit_to_layer_content: 'Sovita kerros sisältöön',
|
||||
fit_to_sel: 'Sovita valinta',
|
||||
align_relative_to: 'Kohdista suhteessa ...',
|
||||
relativeTo: 'suhteessa:',
|
||||
page: 'sivulta',
|
||||
largest_object: 'Suurin kohde',
|
||||
selected_objects: 'valittujen objektien',
|
||||
smallest_object: 'pienin kohde',
|
||||
new_doc: 'Uusi kuva',
|
||||
open_doc: 'Avaa kuva',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Save Image',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Align Bottom',
|
||||
align_center: 'Keskitä',
|
||||
align_left: 'Tasaa vasemmalle',
|
||||
align_middle: 'Kohdista Lähi',
|
||||
align_right: 'Tasaa oikealle',
|
||||
align_top: 'Kohdista Top',
|
||||
mode_select: 'Valitse työkalu',
|
||||
mode_fhpath: 'Kynätyökalu',
|
||||
mode_line: 'Viivatyökalulla',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand suorakaide',
|
||||
mode_ellipse: 'Soikion',
|
||||
mode_circle: 'Ympyrään',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Työkalua',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Suurennustyökalu',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Kumoa',
|
||||
redo: 'Tulppaamalla ilmakanavan',
|
||||
tool_source: 'Muokkaa lähdekoodipaketti',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Tuoteryhmään Elements',
|
||||
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',
|
||||
docprops: 'Asiakirjan ominaisuudet',
|
||||
move_bottom: 'Move to Bottom',
|
||||
move_top: 'Move to Top',
|
||||
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: 'Tallentaa',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Poista Layer',
|
||||
move_down: 'Siirrä Layer alas',
|
||||
new: 'New Layer',
|
||||
rename: 'Nimeä Layer',
|
||||
move_up: 'Siirrä Layer',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Valitse ennalta:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_fi;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_fr = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_fr = {
|
||||
lang: 'fr',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'OK',
|
||||
cancel: 'Annuler',
|
||||
key_backspace: 'Retour Arr.',
|
||||
key_del: 'Suppr.',
|
||||
key_down: 'Bas',
|
||||
key_up: 'Haut',
|
||||
more_opts: "Plus d'options",
|
||||
url: 'URL',
|
||||
width: 'Largeur',
|
||||
height: 'Hauteur'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Propulsé par'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: "Montrer/cacher plus d'outils de contour",
|
||||
palette_info: 'Cliquer pour changer la couleur de remplissage, Maj+clic pour changer la couleur de contour',
|
||||
zoom_level: 'Changer le niveau de zoom',
|
||||
panel_drag: 'Tirer vers la gauche/droite pour redimensionner le panneau',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: "Identifier l'élément",
|
||||
fill_color: 'Changer la couleur de remplissage',
|
||||
stroke_color: 'Changer la couleur du contour',
|
||||
stroke_style: 'Changer le style du contour',
|
||||
stroke_width: 'Changer la largeur du contour de 1, Maj+clic pour changer la largeur de 0,1',
|
||||
pos_x: "Changer l'abscisse (coordonnée X)",
|
||||
pos_y: "Changer l'ordonnée (coordonnée Y)",
|
||||
linecap_butt: 'Terminaison : Sur le nœud',
|
||||
linecap_round: 'Terminaison : Arrondie',
|
||||
linecap_square: 'Terminaison : Carrée',
|
||||
linejoin_bevel: 'Raccord : Biseauté',
|
||||
linejoin_miter: 'Raccord : Droit',
|
||||
linejoin_round: 'Raccord : Arrondi',
|
||||
angle: "Changer l'angle de rotation",
|
||||
blur: 'Changer la valeur du flou gaussien',
|
||||
opacity: "Changer l'opacité de l'élément sélectionné",
|
||||
circle_cx: 'Changer la position horizontale cx du cercle',
|
||||
circle_cy: 'Changer la position verticale cy du cercle',
|
||||
circle_r: 'Changer le rayon du cercle',
|
||||
ellipse_cx: "Changer la position horizontale cx de l'ellipse",
|
||||
ellipse_cy: "Changer la position verticale cy de l'ellipse",
|
||||
ellipse_rx: "Changer le rayon horizontal x de l'ellipse",
|
||||
ellipse_ry: "Changer le rayon vertical y de l'ellipse",
|
||||
line_x1: 'Changer la position horizontale x de début de la ligne',
|
||||
line_x2: 'Changer la position horizontale x de fin de la ligne',
|
||||
line_y1: 'Changer la position verticale y de début de la ligne',
|
||||
line_y2: 'Changer la position verticale y de fin de la ligne',
|
||||
rect_height: 'Changer la hauteur du rectangle',
|
||||
rect_width: 'Changer la largeur du rectangle',
|
||||
corner_radius: 'Changer le rayon des coins du rectangle',
|
||||
image_width: "Changer la largeur de l'image",
|
||||
image_height: "Changer la hauteur de l'image",
|
||||
image_url: "Modifier l'URL",
|
||||
node_x: 'Changer la positon horizontale x du nœud',
|
||||
node_y: 'Changer la position verticale y du nœud',
|
||||
seg_type: 'Changer le type du segment',
|
||||
straight_segments: 'Droit',
|
||||
curve_segments: 'Courbe',
|
||||
text_contents: 'Changer le contenu du texte',
|
||||
font_family: 'Changer la famille de police',
|
||||
font_size: 'Changer la taille de la police',
|
||||
bold: 'Texte en gras',
|
||||
italic: 'Texte en italique'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Menu principal',
|
||||
bkgnd_color_opac: "Changer la couleur d'arrière-plan/l'opacité",
|
||||
connector_no_arrow: 'Sans flèches',
|
||||
fitToContent: 'Ajuster au contenu',
|
||||
fit_to_all: "Ajuster à l'ensemble du contenu",
|
||||
fit_to_canvas: 'Ajuster au canevas',
|
||||
fit_to_layer_content: 'Ajuster au contenu du calque',
|
||||
fit_to_sel: 'Ajuster à la sélection',
|
||||
align_relative_to: 'Aligner par rapport à…',
|
||||
relativeTo: 'par rapport à :',
|
||||
page: 'page',
|
||||
largest_object: 'objet le plus gros',
|
||||
selected_objects: 'objets sélectionnés',
|
||||
smallest_object: 'objet le plus petit',
|
||||
new_doc: 'Nouvelle image',
|
||||
open_doc: 'Ouvrir une image SVG',
|
||||
export_img: 'Exporter',
|
||||
save_doc: "Enregistrer l'image",
|
||||
import_doc: 'Importer une image',
|
||||
align_to_page: "Aligner l'élément à la page",
|
||||
align_bottom: 'Aligner en bas',
|
||||
align_center: 'Centrer verticalement',
|
||||
align_left: 'Aligner à gauche',
|
||||
align_middle: 'Centrer horizontalement',
|
||||
align_right: 'Aligner à droite',
|
||||
align_top: 'Aligner en haut',
|
||||
mode_select: 'Outil de sélection',
|
||||
mode_fhpath: 'Crayon à main levée',
|
||||
mode_line: 'Tracer des lignes',
|
||||
mode_rect: 'Outil rectangle',
|
||||
mode_square: 'Outil carré',
|
||||
mode_fhrect: 'Rectangle à main levée',
|
||||
mode_ellipse: 'Ellipse',
|
||||
mode_circle: 'Cercle',
|
||||
mode_fhellipse: 'Ellipse à main levée',
|
||||
mode_path: 'Outil chemin',
|
||||
mode_text: 'Outil texte',
|
||||
mode_image: 'Outil image',
|
||||
mode_zoom: 'Zoom',
|
||||
no_embed: 'NOTE : Cette image ne peut pas être incorporée. Elle sera chargée à cette adresse',
|
||||
undo: 'Annuler',
|
||||
redo: 'Restaurer',
|
||||
tool_source: 'Modifier la source',
|
||||
wireframe_mode: 'Mode Fil de fer',
|
||||
clone: 'Cloner élément(s)',
|
||||
del: 'Supprimer élément(s)',
|
||||
group_elements: 'Grouper les éléments',
|
||||
make_link: 'Créer un hyperlien',
|
||||
set_link_url: "Définir l'URL du lien (laisser vide pour supprimer)",
|
||||
to_path: 'Convertir en chemin',
|
||||
reorient_path: 'Réorienter le chemin',
|
||||
ungroup: 'Dégrouper les éléments',
|
||||
docprops: 'Propriétés du document',
|
||||
move_bottom: 'Déplacer vers le bas',
|
||||
move_top: 'Déplacer vers le haut',
|
||||
node_clone: 'Cloner le nœud',
|
||||
node_delete: 'Supprimer le nœud',
|
||||
node_link: 'Rendre les points de contrôle solidaires',
|
||||
add_subpath: 'Ajouter un tracé secondaire',
|
||||
openclose_path: 'Ouvrir/fermer le sous-chemin',
|
||||
source_save: 'Appliquer les modifications',
|
||||
cut: 'Couper',
|
||||
copy: 'Copier',
|
||||
paste: 'Coller',
|
||||
paste_in_place: 'Coller sur place',
|
||||
delete: 'Supprimer',
|
||||
group: 'Grouper',
|
||||
move_front: 'Placer au premier plan',
|
||||
move_up: "Avancer d'un plan",
|
||||
move_down: "Reculer d'un plan",
|
||||
move_back: 'Placer au fond'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Calque',
|
||||
layers: 'Calques',
|
||||
del: 'Supprimer le calque',
|
||||
move_down: 'Descendre le calque',
|
||||
new: 'Nouveau calque',
|
||||
rename: 'Renommer le calque',
|
||||
move_up: 'Monter le calque',
|
||||
dupe: 'Dupliquer le calque',
|
||||
merge_down: 'Fusionner vers le bas',
|
||||
merge_all: 'Tout fusionner',
|
||||
move_elems_to: 'Déplacer les éléments vers :',
|
||||
move_selected: 'Déplacer les éléments sélectionnés vers un autre calque'
|
||||
},
|
||||
config: {
|
||||
image_props: "Propriétés de l'image",
|
||||
doc_title: 'Titre',
|
||||
doc_dims: 'Dimensions du canevas',
|
||||
included_images: 'Images insérées',
|
||||
image_opt_embed: 'Incorporer les données des images (fichiers locaux)',
|
||||
image_opt_ref: "Utiliser l'adresse des fichiers",
|
||||
editor_prefs: "Préférences de l'éditeur",
|
||||
icon_size: 'Taille des icônes',
|
||||
language: 'Langue',
|
||||
background: "Toile de fond de l'éditeur",
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: "Note : La toile de fond ne sera pas sauvegardée avec l'image.",
|
||||
icon_large: 'Grande',
|
||||
icon_medium: 'Moyenne',
|
||||
icon_small: 'Petite',
|
||||
icon_xlarge: 'Super grande',
|
||||
select_predefined: 'Sélectionner prédéfinis :',
|
||||
units_and_rulers: 'Unités et règles',
|
||||
show_rulers: 'Afficher les règles',
|
||||
base_unit: 'Unité de mesure :',
|
||||
grid: 'Grille',
|
||||
snapping_onoff: 'Ancrer oui/non',
|
||||
snapping_stepsize: "Pas d'ancrage :",
|
||||
grid_color: 'Couleur de la grille'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'Valeur fournie invalide',
|
||||
noContentToFitTo: "Il n'y a pas de contenu auquel ajuster",
|
||||
dupeLayerName: 'Un autre calque porte déjà ce nom !',
|
||||
enterUniqueLayerName: 'Veuillez entrer un nom (unique) pour le calque',
|
||||
enterNewLayerName: 'Veuillez entrer le nouveau nom du calque',
|
||||
layerHasThatName: 'Le calque porte déjà ce nom',
|
||||
QmoveElemsToLayer: 'Déplacer les éléments sélectionnés vers le calque « %s » ?',
|
||||
QwantToClear: "Voulez-vous effacer le dessin ?\nL'historique de vos actions sera également effacé !",
|
||||
QwantToOpen: "Voulez-vous ouvrir un nouveau document ?\nVous perdrez l'historique de vos modifications !",
|
||||
QerrorsRevertToSource: 'Il y a des erreurs de syntaxe dans votre code source SVG.\nRestaurer le code source SVG antérieur aux modifications ?',
|
||||
QignoreSourceChanges: 'Ignorer les modifications faites à la source SVG ?',
|
||||
featNotSupported: 'Fonction non supportée',
|
||||
enterNewImgURL: "Entrer la nouvelle URL de l'image",
|
||||
defsFailOnSave: "NOTE : En raison d'un bogue dans votre navigateur, il se peut que cette image ne soit pas correctement affichée (dégradés ou éléments manquants). Le souci sera néanmoins réglé à la sauvegarde.",
|
||||
loadingImage: "Chargement de l'image, veuillez patienter…",
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
noteTheseIssues: 'Notez également les problèmes suivants : ',
|
||||
unsavedChanges: 'Il y a des changements non sauvegardés.',
|
||||
enterNewLinkURL: "Entrez la nouvelle URL de l'hyperlien",
|
||||
errorLoadingSVG: 'Erreur : Impossible de charger les données SVG',
|
||||
URLloadFail: "Impossible de charger l'URL",
|
||||
retrieving: 'Récupération de « %s »…',
|
||||
popupWindowBlocked: 'Popup window may be blocked by browser',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_fr;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_fy = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_fy = {
|
||||
lang: 'fy',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Ok',
|
||||
cancel: 'Ôfbrekke',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'omleech',
|
||||
key_up: 'omheech',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Klik om de folkleur te feroarjen, shift-klik om de linekleur te feroarjen.',
|
||||
zoom_level: 'Yn-/útzoome',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Folkleur oanpasse',
|
||||
stroke_color: 'Linekleur oanpasse',
|
||||
stroke_style: 'Linestijl oanpasse',
|
||||
stroke_width: 'Linebreedte oanpasse',
|
||||
pos_x: 'X-koördinaat oanpasse',
|
||||
pos_y: 'Y-koördinaat oanpasse',
|
||||
linecap_butt: 'Linecap: Butt',
|
||||
linecap_round: 'Linecap: Round',
|
||||
linecap_square: 'Linecap: Square',
|
||||
linejoin_bevel: 'Linejoin: Bevel',
|
||||
linejoin_miter: 'Linejoin: Miter',
|
||||
linejoin_round: 'Linejoin: Round',
|
||||
angle: 'Draaie',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Trochsichtigens oanpasse',
|
||||
circle_cx: "Feroarje it X-koördinaat fan it middelpunt fan'e sirkel.",
|
||||
circle_cy: "Feroarje it Y-koördinaat fan it middelpunt fan'e sirkel.",
|
||||
circle_r: 'Feroarje sirkelradius',
|
||||
ellipse_cx: "Feroarje it X-koördinaat fan it middelpunt fan'e ellips.",
|
||||
ellipse_cy: "Feroarje it Y-koördinaat fan it middelpunt fan'e ellips.",
|
||||
ellipse_rx: 'Feroarje ellips X radius',
|
||||
ellipse_ry: 'Feroarje ellips Y radius',
|
||||
line_x1: "Feroarje start X koördinaat fan'e line",
|
||||
line_x2: "Feroarje ein X koördinaat fan'e line",
|
||||
line_y1: "Feroarje start Y koördinaat fan'e line",
|
||||
line_y2: "Feroarje ein Y koördinaat fan'e line",
|
||||
rect_height: 'Hichte rjochthoeke oanpasse',
|
||||
rect_width: 'Breedte rjochthoeke oanpasse',
|
||||
corner_radius: 'Hoekeradius oanpasse',
|
||||
image_width: 'Breedte ôfbielding oanpasse',
|
||||
image_height: 'Hichte ôfbielding oanpasse',
|
||||
image_url: 'URL oanpasse',
|
||||
node_x: 'X-koördinaat knooppunt oanpasse',
|
||||
node_y: 'Y-koördinaat knooppunt oanpasse',
|
||||
seg_type: 'Segmenttype oanpasse',
|
||||
straight_segments: 'Rjocht',
|
||||
curve_segments: 'Bûcht',
|
||||
text_contents: 'Tekst oanpasse',
|
||||
font_family: 'Lettertype oanpasse',
|
||||
font_size: 'Lettergrutte oanpasse',
|
||||
bold: 'Fet',
|
||||
italic: 'Skean'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Eftergrûnkleur/trochsichtigens oanpasse',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Passe op ynhâld',
|
||||
fit_to_all: 'Op alle ynhâld passe',
|
||||
fit_to_canvas: 'Op kanvas passe',
|
||||
fit_to_layer_content: 'Op laachynhâld passe',
|
||||
fit_to_sel: 'Op seleksje passe',
|
||||
align_relative_to: 'Útlijne relatyf oan...',
|
||||
relativeTo: 'Relatief tsjinoer:',
|
||||
page: 'Side',
|
||||
largest_object: 'Grutste ûnderdiel',
|
||||
selected_objects: 'Selektearre ûnderdielen',
|
||||
smallest_object: 'Lytste ûnderdiel',
|
||||
new_doc: 'Nije ôfbielding',
|
||||
open_doc: 'Ôfbielding iepenje',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Ôfbielding bewarje',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Ûnder útlijne',
|
||||
align_center: 'Midden útlijne',
|
||||
align_left: 'Lofts útlijne',
|
||||
align_middle: 'Midden útlijne',
|
||||
align_right: 'Rjochts útlijne',
|
||||
align_top: 'Boppe útlijne',
|
||||
mode_select: 'Selektearje',
|
||||
mode_fhpath: 'Potlead',
|
||||
mode_line: 'Line',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Frije rjochthoeke',
|
||||
mode_ellipse: 'Ellips',
|
||||
mode_circle: 'Sirkel',
|
||||
mode_fhellipse: 'Frije ellips',
|
||||
mode_path: 'Paad',
|
||||
mode_text: 'Tekst',
|
||||
mode_image: 'Ôfbielding',
|
||||
mode_zoom: 'Zoom',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Ungedien meitjse',
|
||||
redo: "Op 'e nij",
|
||||
tool_source: 'Boarne oanpasse',
|
||||
wireframe_mode: 'Triemodel',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Ûnderdielen groepearje',
|
||||
make_link: 'Make (hyper)link',
|
||||
set_link_url: 'Set link URL (leave empty to remove)',
|
||||
to_path: 'Omsette nei paad',
|
||||
reorient_path: 'Paad opnij orientearje',
|
||||
ungroup: 'Groepering opheffe',
|
||||
docprops: 'Dokuminteigenskippen',
|
||||
move_bottom: 'Nei eftergrûn',
|
||||
move_top: 'Nei foargrûn',
|
||||
node_clone: 'Knooppunt duplisearje',
|
||||
node_delete: 'Knooppunt fuortsmite',
|
||||
node_link: 'Knooppunten keppelje',
|
||||
add_subpath: 'Add sub-path',
|
||||
openclose_path: 'Open/close sub-path',
|
||||
source_save: 'Feroarings tapasse',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Laach',
|
||||
layers: 'Layers',
|
||||
del: 'Laach fuortsmite',
|
||||
move_down: 'Laach omleech bringe',
|
||||
new: 'Nije laach',
|
||||
rename: 'Laach omneame',
|
||||
move_up: 'Laach omheech bringe',
|
||||
dupe: 'Duplicate Layer',
|
||||
merge_down: 'Merge Down',
|
||||
merge_all: 'Merge All',
|
||||
move_elems_to: 'Ûnderdielen ferplaate nei:',
|
||||
move_selected: 'Selektearre ûnderdielen ferplaatse nei in oare laach'
|
||||
},
|
||||
config: {
|
||||
image_props: 'Ôfbieldingseigenskippen',
|
||||
doc_title: 'Titel',
|
||||
doc_dims: 'Kanvasgrutte',
|
||||
included_images: 'Ynslúten ôfbieldingen',
|
||||
image_opt_embed: 'Ynformaasje tafoege (lokale triemen)',
|
||||
image_opt_ref: 'Triemreferensje brûke',
|
||||
editor_prefs: 'Eigenskippen bewurker',
|
||||
icon_size: 'Ikoangrutte',
|
||||
language: 'Taal',
|
||||
background: 'Eftergrûn bewurker',
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: 'Let op: de eftergrûn wurd net mei de ôfbielding bewarre.',
|
||||
icon_large: 'Grut',
|
||||
icon_medium: 'Middel',
|
||||
icon_small: 'Lyts',
|
||||
icon_xlarge: 'Ekstra grut',
|
||||
select_predefined: 'Selektearje:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'Ferkearde waarde jûn',
|
||||
noContentToFitTo: 'Gjin ynhâld om te passen',
|
||||
dupeLayerName: 'Der is al in laach mei dy namme!',
|
||||
enterUniqueLayerName: 'Type in unyke laachnamme',
|
||||
enterNewLayerName: 'Type in nije laachnamme',
|
||||
layerHasThatName: 'Laach hat dy namme al',
|
||||
QmoveElemsToLayer: "Selektearre ûnderdielen ferplaatse nei '%s'?",
|
||||
QwantToClear: 'Ôfbielding leechmeitsje? Dit sil ek de skiednis fuortsmite!',
|
||||
QwantToOpen: 'Do you want to open a new file?\nThis will also erase your undo history!',
|
||||
QerrorsRevertToSource: 'Der wiene flaters yn de SVG-boarne.\nWeromgean nei foarige SVG-boarne?',
|
||||
QignoreSourceChanges: 'Feroarings yn SVG-boarne negeare?',
|
||||
featNotSupported: 'Funksje wurdt net ûndersteund',
|
||||
enterNewImgURL: 'Jou de nije 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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_fy;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_ga = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_ga = {
|
||||
lang: 'ga',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Sábháil',
|
||||
cancel: 'Cealaigh',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Cliceáil chun athrú a líonadh dath, aistriú-cliceáil chun dath a athrú stróc',
|
||||
zoom_level: 'Athraigh súmáil leibhéal',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Athraigh an dath a líonadh',
|
||||
stroke_color: 'Dath stróc Athrú',
|
||||
stroke_style: 'Athraigh an stíl Fleasc stróc',
|
||||
stroke_width: 'Leithead stróc Athrú',
|
||||
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',
|
||||
angle: 'Uillinn rothlaithe Athrú',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Athraigh roghnaithe teimhneacht mír',
|
||||
circle_cx: 'Athraigh an ciorcal a chomhordú CX',
|
||||
circle_cy: 'Athraigh an ciorcal a chomhordú ga',
|
||||
circle_r: 'Athraigh an ciorcal's ga',
|
||||
ellipse_cx: 'Athraigh Éilips's CX a chomhordú',
|
||||
ellipse_cy: 'Athraigh an Éilips a chomhordú ga',
|
||||
ellipse_rx: 'Éilips Athraigh an gha x',
|
||||
ellipse_ry: 'Éilips Athraigh an gha y',
|
||||
line_x1: 'Athraigh an líne tosaigh a chomhordú x',
|
||||
line_x2: 'Athraigh an líne deireadh x chomhordú',
|
||||
line_y1: 'Athraigh an líne tosaigh a chomhordú y',
|
||||
line_y2: 'Athrú ar líne deireadh y chomhordú',
|
||||
rect_height: 'Airde dronuilleog Athrú',
|
||||
rect_width: 'Leithead dronuilleog Athrú',
|
||||
corner_radius: 'Athraigh Dronuilleog Cúinne na Ga',
|
||||
image_width: 'Leithead íomhá Athrú',
|
||||
image_height: 'Airde íomhá Athrú',
|
||||
image_url: 'Athraigh an URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Inneachar Athraigh téacs',
|
||||
font_family: 'Athraigh an Cló Teaghlaigh',
|
||||
font_size: 'Athraigh Clómhéid',
|
||||
bold: 'Trom Téacs',
|
||||
italic: 'Iodálach Téacs'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Dath cúlra Athraigh / teimhneacht',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Fit to Content',
|
||||
fit_to_all: 'Laghdaigh do gach ábhar',
|
||||
fit_to_canvas: 'Laghdaigh ar chanbhás',
|
||||
fit_to_layer_content: 'Laghdaigh shraith ábhar a',
|
||||
fit_to_sel: 'Laghdaigh a roghnú',
|
||||
align_relative_to: 'Ailínigh i gcomparáid leis ...',
|
||||
relativeTo: 'i gcomparáid leis:',
|
||||
page: 'leathanach',
|
||||
largest_object: 'réad is mó',
|
||||
selected_objects: 'réada tofa',
|
||||
smallest_object: 'lú réad',
|
||||
new_doc: 'Íomhá Nua',
|
||||
open_doc: 'Íomhá Oscailte',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Sábháil Íomhá',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Cineál Bun',
|
||||
align_center: 'Ailínigh sa Lár',
|
||||
align_left: 'Ailínigh ar Chlé',
|
||||
align_middle: 'Cineál Middle',
|
||||
align_right: 'Ailínigh ar Dheis',
|
||||
align_top: 'Cineál Barr',
|
||||
mode_select: 'Roghnaigh Uirlis',
|
||||
mode_fhpath: 'Phionsail Uirlis',
|
||||
mode_line: 'Uirlis Líne',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Saor Hand Dronuilleog',
|
||||
mode_ellipse: 'Éilips',
|
||||
mode_circle: 'Ciorcal',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Téacs Uirlis',
|
||||
mode_image: 'Íomhá Uirlis',
|
||||
mode_zoom: 'Zúmáil Uirlis',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Cealaigh',
|
||||
redo: 'Athdhéan',
|
||||
tool_source: 'Cuir Foinse',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Eilimintí Grúpa',
|
||||
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: 'Eilimintí Díghrúpáil',
|
||||
docprops: 'Doiciméad Airíonna',
|
||||
move_bottom: 'Téigh go Bun',
|
||||
move_top: 'Téigh go Barr',
|
||||
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: 'Sábháil',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Scrios Sraith',
|
||||
move_down: 'Bog Sraith Síos',
|
||||
new: 'Sraith Nua',
|
||||
rename: 'Athainmnigh Sraith',
|
||||
move_up: 'Bog Sraith Suas',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Roghnaigh réamhshainithe:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_ga;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_gl = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_gl = {
|
||||
lang: 'gl',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'Gardar',
|
||||
cancel: 'Cancelar',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'Preme aquí para cambiar a cor de recheo, Shift-clic para cambiar a cor do curso',
|
||||
zoom_level: 'Cambiar o nivel de zoom',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'Cambia-la cor de recheo',
|
||||
stroke_color: 'Cambiar a cor do curso',
|
||||
stroke_style: 'Modifica o estilo do trazo do curso',
|
||||
stroke_width: 'Cambiar o ancho do curso',
|
||||
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',
|
||||
angle: 'Cambiar o ángulo de xiro',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'Cambia a opacidade elemento seleccionado',
|
||||
circle_cx: 'Cx Cambiar círculo de coordenadas',
|
||||
circle_cy: 'Círculo Cambio cy coordinar',
|
||||
circle_r: 'Cambiar círculo de raio',
|
||||
ellipse_cx: 'Cambiar elipse cx coordinar',
|
||||
ellipse_cy: 'Elipse Cambio cy coordinar',
|
||||
ellipse_rx: 'Raios X Change elipse',
|
||||
ellipse_ry: 'Radio y Change elipse',
|
||||
line_x1: 'Cambie a liña de partida coordenada x',
|
||||
line_x2: 'Cambie a liña acaba coordenada x',
|
||||
line_y1: 'Cambio na liña do recurso coordinada y',
|
||||
line_y2: 'Salto de liña acaba coordinada y',
|
||||
rect_height: 'Cambiar altura do rectángulo',
|
||||
rect_width: 'Cambiar a largo rectángulo',
|
||||
corner_radius: 'Cambiar Corner Rectangle Radius',
|
||||
image_width: 'Cambiar o ancho da imaxe',
|
||||
image_height: 'Cambiar altura da imaxe',
|
||||
image_url: 'Cambiar URL',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'Cambiar o contido de texto',
|
||||
font_family: 'Cambiar fonte Familia',
|
||||
font_size: 'Mudar tamaño de letra',
|
||||
bold: 'Bold Text',
|
||||
italic: 'Texto en cursiva'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'Mudar a cor de fondo / Opacidade',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'Axustar ó contido',
|
||||
fit_to_all: 'Axustar a todo o contido',
|
||||
fit_to_canvas: 'Axustar a pantalla',
|
||||
fit_to_layer_content: 'Axustar o contido da capa de',
|
||||
fit_to_sel: 'Axustar a selección',
|
||||
align_relative_to: 'Aliñar en relación a ...',
|
||||
relativeTo: 'en relación ao:',
|
||||
page: 'Portada',
|
||||
largest_object: 'maior obxecto',
|
||||
selected_objects: 'obxectos elixidos',
|
||||
smallest_object: 'menor obxecto',
|
||||
new_doc: 'Nova Imaxe',
|
||||
open_doc: 'Abrir Imaxe',
|
||||
export_img: 'Export',
|
||||
save_doc: 'Gardar Imaxe',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'Align bottom',
|
||||
align_center: 'Centrar',
|
||||
align_left: 'Aliñar á Esquerda',
|
||||
align_middle: 'Aliñar Medio',
|
||||
align_right: 'Aliñar á Dereita',
|
||||
align_top: 'Align Top',
|
||||
mode_select: 'Seleccionar a ferramenta',
|
||||
mode_fhpath: 'Ferramenta Lapis',
|
||||
mode_line: 'Ferramenta Liña',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand Rectangle',
|
||||
mode_ellipse: 'Elipse',
|
||||
mode_circle: 'Circle',
|
||||
mode_fhellipse: 'Free-Hand Ellipse',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'Ferramenta de Texto',
|
||||
mode_image: 'Image Tool',
|
||||
mode_zoom: 'Zoom Tool',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'Desfacer',
|
||||
redo: 'Volver',
|
||||
tool_source: 'Fonte Editar',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'Elementos do grupo',
|
||||
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: 'Elementos Desagrupadas',
|
||||
docprops: 'Propriedades do Documento',
|
||||
move_bottom: 'Move a Bottom',
|
||||
move_top: 'Move to Top',
|
||||
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: 'Gardar',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'Delete Layer',
|
||||
move_down: 'Move capa inferior',
|
||||
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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'Seleccione por defecto:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_gl;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_he = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_he = {
|
||||
lang: 'he',
|
||||
dir: 'rtl',
|
||||
common: {
|
||||
ok: 'לשמור',
|
||||
cancel: 'ביטול',
|
||||
key_backspace: 'backspace',
|
||||
key_del: 'delete',
|
||||
key_down: 'down',
|
||||
key_up: 'up',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'לחץ כדי לשנות צבע מילוי, לחץ על Shift-לשנות צבע שבץ',
|
||||
zoom_level: 'שינוי גודל תצוגה',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'שינוי צבע מילוי',
|
||||
stroke_color: 'שינוי צבע שבץ',
|
||||
stroke_style: 'דש שבץ שינוי סגנון',
|
||||
stroke_width: 'שינוי רוחב שבץ',
|
||||
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',
|
||||
angle: 'שינוי זווית הסיבוב',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'שינוי הפריט הנבחר אטימות',
|
||||
circle_cx: 'CX מעגל של שנה לתאם',
|
||||
circle_cy: 'מעגל שנה של cy לתאם',
|
||||
circle_r: 'מעגל שנה של רדיוס',
|
||||
ellipse_cx: 'שינוי של אליפסה CX לתאם',
|
||||
ellipse_cy: 'אליפסה שינוי של cy לתאם',
|
||||
ellipse_rx: 'אליפסה שינוי של רדיוס x',
|
||||
ellipse_ry: 'אליפסה שינוי של Y רדיוס',
|
||||
line_x1: 'שינוי קו ההתחלה של x לתאם',
|
||||
line_x2: 'שינוי קו הסיום של x לתאם',
|
||||
line_y1: 'שינוי קו ההתחלה של Y לתאם',
|
||||
line_y2: 'שינוי קו הסיום של Y לתאם',
|
||||
rect_height: 'שינוי גובה המלבן',
|
||||
rect_width: 'שינוי רוחב המלבן',
|
||||
corner_radius: 'לשנות מלבן פינת רדיוס',
|
||||
image_width: 'שינוי רוחב התמונה',
|
||||
image_height: 'שינוי גובה התמונה',
|
||||
image_url: 'שינוי כתובת',
|
||||
node_x: "Change node's x coordinate",
|
||||
node_y: "Change node's y coordinate",
|
||||
seg_type: 'Change Segment type',
|
||||
straight_segments: 'Straight',
|
||||
curve_segments: 'Curve',
|
||||
text_contents: 'שינוי תוכן טקסט',
|
||||
font_family: 'שינוי גופן משפחה',
|
||||
font_size: 'שנה גודל גופן',
|
||||
bold: 'טקסט מודגש',
|
||||
italic: 'טקסט נטוי'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'שנה את צבע הרקע / אטימות',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'התאם תוכן',
|
||||
fit_to_all: 'התאם התכנים',
|
||||
fit_to_canvas: 'התאם בד',
|
||||
fit_to_layer_content: 'מתאים לתוכן שכבת',
|
||||
fit_to_sel: 'התאם הבחירה',
|
||||
align_relative_to: 'יישור ביחס ...',
|
||||
relativeTo: 'יחסית:',
|
||||
page: 'דף',
|
||||
largest_object: 'האובייקט הגדול',
|
||||
selected_objects: 'elected objects',
|
||||
smallest_object: 'הקטן אובייקט',
|
||||
new_doc: 'תמונה חדשה',
|
||||
open_doc: 'פתח תמונה',
|
||||
export_img: 'Export',
|
||||
save_doc: 'שמור תמונה',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'יישור תחתון',
|
||||
align_center: 'ישור לאמצע',
|
||||
align_left: 'יישור לשמאל',
|
||||
align_middle: 'יישור התיכון',
|
||||
align_right: 'יישור לימין',
|
||||
align_top: 'יישור למעלה',
|
||||
mode_select: 'Select Tool',
|
||||
mode_fhpath: 'כלי העיפרון',
|
||||
mode_line: 'כלי הקו',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'Free-Hand מלבן',
|
||||
mode_ellipse: 'אליפסה',
|
||||
mode_circle: 'Circle',
|
||||
mode_fhellipse: 'Free-Hand אליפסה',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'כלי טקסט',
|
||||
mode_image: 'כלי תמונה',
|
||||
mode_zoom: 'זום כלי',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'בטל',
|
||||
redo: 'בצע שוב',
|
||||
tool_source: 'מקור ערוך',
|
||||
wireframe_mode: 'Wireframe Mode',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'אלמנטים הקבוצה',
|
||||
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: 'אלמנטים פרק קבוצה',
|
||||
docprops: 'מאפייני מסמך',
|
||||
move_bottom: 'הזז למטה',
|
||||
move_top: 'עבור לראש הדף',
|
||||
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: 'לשמור',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'Layer',
|
||||
layers: 'Layers',
|
||||
del: 'מחיקת שכבה',
|
||||
move_down: 'הזז למטה שכבה',
|
||||
new: 'שכבהחדשה',
|
||||
rename: 'שינוי שם שכבה',
|
||||
move_up: 'העבר שכבה 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'
|
||||
},
|
||||
config: {
|
||||
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: 'Image 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: 'בחר מוגדרים מראש:',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
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?',
|
||||
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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_he;
|
||||
|
||||
}());
|
|
@ -0,0 +1,224 @@
|
|||
var svgEditorLang_hi = (function () {
|
||||
'use strict';
|
||||
|
||||
var lang_hi = {
|
||||
lang: 'hi',
|
||||
dir: 'ltr',
|
||||
common: {
|
||||
ok: 'बचाना',
|
||||
cancel: 'रद्द करें',
|
||||
key_backspace: 'बैकस्पेस',
|
||||
key_del: 'हटायें',
|
||||
key_down: 'नीचे',
|
||||
key_up: 'ऊपर',
|
||||
more_opts: 'More Options',
|
||||
url: 'URL',
|
||||
width: 'Width',
|
||||
height: 'Height'
|
||||
},
|
||||
misc: {
|
||||
powered_by: 'Powered by'
|
||||
},
|
||||
ui: {
|
||||
toggle_stroke_tools: 'Show/hide more stroke tools',
|
||||
palette_info: 'रंग बदलने पर क्लिक करें, बदलाव भरने के क्लिक करने के लिए स्ट्रोक का रंग बदलने के लिए',
|
||||
zoom_level: 'बदलें स्तर ज़ूम',
|
||||
panel_drag: 'Drag left/right to resize side panel',
|
||||
quality: 'Quality:',
|
||||
pathNodeTooltip: 'Drag node to move it. Double-click node to change segment type',
|
||||
pathCtrlPtTooltip: 'Drag control point to adjust curve properties',
|
||||
pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity',
|
||||
pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity'
|
||||
},
|
||||
properties: {
|
||||
id: 'Identify the element',
|
||||
fill_color: 'बदलें का रंग भरना',
|
||||
stroke_color: 'बदलें स्ट्रोक रंग',
|
||||
stroke_style: 'बदलें स्ट्रोक डेश शैली',
|
||||
stroke_width: 'बदलें स्ट्रोक चौड़ाई',
|
||||
pos_x: 'X समकक्ष बदलें ',
|
||||
pos_y: 'Y समकक्ष बदलें',
|
||||
linecap_butt: 'Linecap: Butt',
|
||||
linecap_round: 'Linecap: Round',
|
||||
linecap_square: 'Linecap: Square',
|
||||
linejoin_bevel: 'Linejoin: Bevel',
|
||||
linejoin_miter: 'Linejoin: Miter',
|
||||
linejoin_round: 'Linejoin: Round',
|
||||
angle: 'बदलें रोटेशन कोण',
|
||||
blur: 'Change gaussian blur value',
|
||||
opacity: 'पारदर्शिता बदलें',
|
||||
circle_cx: 'बदल रहा है चक्र cx समन्वय',
|
||||
circle_cy: 'परिवर्तन चक्र cy समन्वय है',
|
||||
circle_r: 'बदल रहा है चक्र त्रिज्या',
|
||||
ellipse_cx: 'बदलें दीर्घवृत्त है cx समन्वय',
|
||||
ellipse_cy: 'बदलें दीर्घवृत्त cy समन्वय है',
|
||||
ellipse_rx: 'बदल रहा है दीर्घवृत्त x त्रिज्या',
|
||||
ellipse_ry: 'बदल रहा है दीर्घवृत्त y त्रिज्या',
|
||||
line_x1: 'बदल रहा है लाइन x समन्वय शुरू',
|
||||
line_x2: 'बदल रहा है लाइन x समन्वय समाप्त',
|
||||
line_y1: 'बदलें रेखा y शुरू हो रहा है समन्वय',
|
||||
line_y2: 'बदलें रेखा y अंत है समन्वय',
|
||||
rect_height: 'बदलें आयत ऊंचाई',
|
||||
rect_width: 'बदलें आयत चौड़ाई',
|
||||
corner_radius: 'बदलें आयत कॉर्नर त्रिज्या',
|
||||
image_width: 'बदलें छवि चौड़ाई',
|
||||
image_height: 'बदलें छवि ऊँचाई',
|
||||
image_url: 'बदलें यूआरएल',
|
||||
node_x: 'नोड का x समकक्ष बदलें',
|
||||
node_y: 'नोड का y समकक्ष बदलें',
|
||||
seg_type: 'वर्ग प्रकार बदलें',
|
||||
straight_segments: 'सीधे वर्ग',
|
||||
curve_segments: 'घुमाव',
|
||||
text_contents: 'बदलें पाठ सामग्री',
|
||||
font_family: 'बदलें फ़ॉन्ट परिवार',
|
||||
font_size: 'फ़ॉन्ट का आकार बदलें',
|
||||
bold: 'मोटा पाठ',
|
||||
italic: 'इटैलिक पाठ'
|
||||
},
|
||||
tools: {
|
||||
main_menu: 'Main Menu',
|
||||
bkgnd_color_opac: 'पृष्ठभूमि का रंग बदल / अस्पष्टता',
|
||||
connector_no_arrow: 'No arrow',
|
||||
fitToContent: 'सामग्री के लिए फिट',
|
||||
fit_to_all: 'सभी सामग्री के लिए फिट',
|
||||
fit_to_canvas: 'फिट कैनवास को',
|
||||
fit_to_layer_content: 'फिट परत सामग्री के लिए',
|
||||
fit_to_sel: 'चयन के लिए फिट',
|
||||
align_relative_to: 'संरेखित करें रिश्तेदार को ...',
|
||||
relativeTo: 'रिश्तेदार को:',
|
||||
page: 'पृष्ठ',
|
||||
largest_object: 'सबसे बड़ी वस्तु',
|
||||
selected_objects: 'निर्वाचित वस्तुओं',
|
||||
smallest_object: 'छोटी से छोटी वस्तु',
|
||||
new_doc: 'नई छवि',
|
||||
open_doc: 'छवि खोलें',
|
||||
export_img: 'Export',
|
||||
save_doc: 'सहेजें छवि',
|
||||
import_doc: 'Import Image',
|
||||
align_to_page: 'Align Element to Page',
|
||||
align_bottom: 'तलमेंपंक्तिबद्धकरें',
|
||||
align_center: 'मध्य में समंजित करें',
|
||||
align_left: ' पंक्तिबद्ध करें',
|
||||
align_middle: 'मध्य संरेखित करें',
|
||||
align_right: 'दायाँपंक्तिबद्धकरें',
|
||||
align_top: 'शीर्षमेंपंक्तिबद्धकरें',
|
||||
mode_select: 'उपकरण चुनें',
|
||||
mode_fhpath: 'पेंसिल उपकरण',
|
||||
mode_line: 'लाइन उपकरण',
|
||||
mode_rect: 'Rectangle Tool',
|
||||
mode_square: 'Square Tool',
|
||||
mode_fhrect: 'नि: शुल्क हाथ आयत',
|
||||
mode_ellipse: 'दीर्घवृत्त',
|
||||
mode_circle: 'वृत्त',
|
||||
mode_fhellipse: 'नि: शुल्क हाथ दीर्घवृत्त',
|
||||
mode_path: 'Path Tool',
|
||||
mode_text: 'पाठ उपकरण',
|
||||
mode_image: 'छवि उपकरण',
|
||||
mode_zoom: 'ज़ूम उपकरण',
|
||||
no_embed: 'NOTE: This image cannot be embedded. It will depend on this path to be displayed',
|
||||
undo: 'पूर्ववत करें',
|
||||
redo: 'फिर से करें',
|
||||
tool_source: 'स्रोत में बदलाव करें',
|
||||
wireframe_mode: 'रूपरेखा मोड',
|
||||
clone: 'Clone Element(s)',
|
||||
del: 'Delete Element(s)',
|
||||
group_elements: 'समूह तत्वों',
|
||||
make_link: 'Make (hyper)link',
|
||||
set_link_url: 'Set link URL (leave empty to remove)',
|
||||
to_path: 'पथ में बदलें',
|
||||
reorient_path: 'पथ को नई दिशा दें',
|
||||
ungroup: 'अंश को समूह से अलग करें',
|
||||
docprops: 'दस्तावेज़ गुण',
|
||||
move_bottom: 'नीचे ले जाएँ',
|
||||
move_top: 'ऊपर ले जाएँ',
|
||||
node_clone: 'नोड क्लोन',
|
||||
node_delete: 'नोड हटायें',
|
||||
node_link: 'कड़ी नियंत्रण बिंदु',
|
||||
add_subpath: 'Add sub-path',
|
||||
openclose_path: 'Open/close sub-path',
|
||||
source_save: 'बचाना',
|
||||
cut: 'Cut',
|
||||
copy: 'Copy',
|
||||
paste: 'Paste',
|
||||
paste_in_place: 'Paste in Place',
|
||||
delete: 'Delete',
|
||||
group: 'Group',
|
||||
move_front: 'Bring to Front',
|
||||
move_up: 'Bring Forward',
|
||||
move_down: 'Send Backward',
|
||||
move_back: 'Send to Back'
|
||||
},
|
||||
layers: {
|
||||
layer: 'परत',
|
||||
layers: 'Layers',
|
||||
del: 'परत हटाएँ',
|
||||
move_down: 'परत नीचे ले जाएँ',
|
||||
new: 'नई परत',
|
||||
rename: 'परत का नाम बदलें',
|
||||
move_up: 'परत ऊपर ले जाएँ',
|
||||
dupe: 'Duplicate Layer',
|
||||
merge_down: 'Merge Down',
|
||||
merge_all: 'Merge All',
|
||||
move_elems_to: 'अंश को ले जाएँ:',
|
||||
move_selected: 'चयनित अंश को दूसरी परत पर ले जाएँ'
|
||||
},
|
||||
config: {
|
||||
image_props: 'छवि के गुण',
|
||||
doc_title: 'शीर्षक',
|
||||
doc_dims: 'कैनवास आयाम',
|
||||
included_images: 'शामिल छवियाँ',
|
||||
image_opt_embed: 'एम्बेड डेटा (स्थानीय फ़ाइलें)',
|
||||
image_opt_ref: 'फाइल के संदर्भ का प्रयोग',
|
||||
editor_prefs: 'संपादक वरीयताएँ',
|
||||
icon_size: 'चिह्न का आकार',
|
||||
language: 'भाषा',
|
||||
background: 'संपादक पृष्ठभूमि',
|
||||
editor_img_url: 'Image URL',
|
||||
editor_bg_note: 'नोट: पृष्ठभूमि छवि के साथ नहीं बचायी जाएगी',
|
||||
icon_large: 'बड़ा',
|
||||
icon_medium: 'मध्यम',
|
||||
icon_small: 'छोटा',
|
||||
icon_xlarge: 'बहुत बड़ा',
|
||||
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'
|
||||
},
|
||||
notification: {
|
||||
invalidAttrValGiven: 'अमान्य मूल्य',
|
||||
noContentToFitTo: 'कोई सामग्री फिट करने के लिए उपलब्ध नहीं',
|
||||
dupeLayerName: 'इस नाम कि परत पहले से मौजूद है !',
|
||||
enterUniqueLayerName: 'कृपया परत का एक अद्वितीय नाम डालें',
|
||||
enterNewLayerName: 'कृपया परत का एक नया नाम डालें',
|
||||
layerHasThatName: 'परत का पहले से ही यही नाम है',
|
||||
QmoveElemsToLayer: "चयनित अंश को परत '%s' पर ले जाएँ ?",
|
||||
QwantToClear: 'क्या आप छवि साफ़ करना चाहते हैं?\nयह आपके उन्डू इतिहास को भी मिटा देगा!',
|
||||
QwantToOpen: 'Do you want to open a new file?\nThis will also erase your undo history!',
|
||||
QerrorsRevertToSource: 'आपके एस.वी.जी. स्रोत में त्रुटियों थी.\nक्या आप मूल एस.वी.जी स्रोत पर वापिस जाना चाहते हैं?',
|
||||
QignoreSourceChanges: 'एसवीजी स्रोत से लाये बदलावों को ध्यान न दें?',
|
||||
featNotSupported: 'सुविधा असमर्थित है',
|
||||
enterNewImgURL: 'नई छवि 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...',
|
||||
saveFromBrowser: "Select 'Save As...' in your browser (possibly via file menu or right-click context-menu) to save this image as a %s file.",
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
||||
|
||||
return lang_hi;
|
||||
|
||||
}());
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue