- Fix: Add images (and references) for fallback (#135)

- Fix (canvg): blur export fix
- i18n (Chinese): A few fixes (#135)
- Optimize: Further image optimizing
- Refactoring: Avoid custom JS substitution syntax
- Refactoring: Reorder default extension list
master
Brett Zamir 2018-05-28 22:00:20 +08:00
parent 5ad6e6ba48
commit acb57c1609
111 changed files with 372 additions and 155 deletions

View File

@ -8,14 +8,17 @@
- Fix: Ensure SVG icon of flyout right-arrow is cloned to can be applied to - Fix: Ensure SVG icon of flyout right-arrow is cloned to can be applied to
more than one extension more than one extension
- Fix: Ensure line tool shows as selected when "L" key command is used - 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 (svgIcons plugin): Race condition
- Fix (canvg): Regression for `text` and `tspan` elements as far as - Fix (canvg): Regression for `text` and `tspan` elements as far as
`captureTextNodes` with canvg (inheriting class had set `captureTextNodes` with canvg (inheriting class had set
`captureTextNodes` too late) `captureTextNodes` too late)
- Fix (canvg): Regression on blur
- Fix (canvg): Avoid errors for `tspan` passed to `getGradient` - Fix (canvg): Avoid errors for `tspan` passed to `getGradient`
- i18n: picking stroke/fill paint and opacity - i18n: picking stroke/fill paint and opacity
- Enhancement: Create xdomain file build which works without ES6 Modules - Enhancement: Create xdomain file build which works without ES6 Modules
- Enhancement: Build xdomain files dynamically - Enhancement: Build xdomain files dynamically
- Optimize: Further image optimizing
- Optimize: Avoid rewriting `points` attribute for free-hand path; - Optimize: Avoid rewriting `points` attribute for free-hand path;
incorporates #176 (fixes #175) incorporates #176 (fixes #175)
- Refactoring: Avoid passing on `undefined` var. (#147) - Refactoring: Avoid passing on `undefined` var. (#147)

2
dist/canvg.js vendored
View File

@ -4051,7 +4051,7 @@ var canvg = (function (exports) {
ctx.canvas.id = svg.UniqueId(); ctx.canvas.id = svg.UniqueId();
ctx.canvas.style.display = 'none'; ctx.canvas.style.display = 'none';
document.body.append(ctx.canvas); document.body.append(ctx.canvas);
canvasRGBA_(ctx.canvas.id, x, y, width, height, this.blurRadius); canvasRGBA_(ctx.canvas, x, y, width, height, this.blurRadius);
ctx.canvas.remove(); ctx.canvas.remove();
} }
}]); }]);

View File

@ -97,6 +97,7 @@ var svgEditorExtension_closepath = (function () {
buttons = [{ buttons = [{
id: 'tool_openpath', id: 'tool_openpath',
icon: svgEditor.curConfig.extIconsPath + 'openpath.png',
type: 'context', type: 'context',
panel: 'closepath_panel', panel: 'closepath_panel',
events: { events: {
@ -106,6 +107,7 @@ var svgEditorExtension_closepath = (function () {
} }
}, { }, {
id: 'tool_closepath', id: 'tool_closepath',
icon: svgEditor.curConfig.extIconsPath + 'closepath.png',
type: 'context', type: 'context',
panel: 'closepath_panel', panel: 'closepath_panel',
events: { events: {

View File

@ -97,6 +97,7 @@ var svgEditorExtension_eyedropper = (function () {
}; };
buttons = [{ buttons = [{
id: 'tool_eyedropper', id: 'tool_eyedropper',
icon: svgEditor.curConfig.extIconsPath + 'eyedropper.png',
type: 'mode', type: 'mode',
events: { events: {
click: function click() { click: function click() {

View File

@ -130,6 +130,7 @@ var svgEditorExtension_foreignobject = (function () {
buttons = [{ buttons = [{
id: 'tool_foreign', id: 'tool_foreign',
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-tool.png',
type: 'mode', type: 'mode',
events: { events: {
click: function click() { click: function click() {
@ -138,6 +139,7 @@ var svgEditorExtension_foreignobject = (function () {
} }
}, { }, {
id: 'edit_foreign', id: 'edit_foreign',
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-edit.png',
type: 'context', type: 'context',
panel: 'foreignObject_panel', panel: 'foreignObject_panel',
events: { events: {

View File

@ -179,6 +179,7 @@ var svgEditorExtension_grid = (function () {
buttons = [{ buttons = [{
id: 'view_grid', id: 'view_grid',
icon: svgEditor.curConfig.extIconsPath + 'grid.png',
type: 'context', type: 'context',
panel: 'editor_panel', panel: 'editor_panel',
events: { events: {

View File

@ -112,6 +112,9 @@ var svgEditorExtension_helloworld = (function () {
// Must match the icon ID in helloworld-icon.xml // Must match the icon ID in helloworld-icon.xml
id: 'hello_world', 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" // This indicates that the button will be added to the "mode"
// button panel on the left side // button panel on the left side
type: 'mode', type: 'mode',

View File

@ -392,6 +392,7 @@ var svgEditorExtension_imagelib = (function () {
buttons = [{ buttons = [{
id: 'tool_imagelib', id: 'tool_imagelib',
type: 'app_menu', // _flyout type: 'app_menu', // _flyout
icon: svgEditor.curConfig.extIconsPath + 'imagelib.png',
position: 4, position: 4,
events: { events: {
mouseup: showBrowser mouseup: showBrowser

View File

@ -99,11 +99,12 @@ var svgEditorExtension_markers = (function () {
$.each(mtypes, function (k, pos) { $.each(mtypes, function (k, pos) {
var listname = pos + '_marker_list'; var listname = pos + '_marker_list';
var def = true; var def = true;
$.each(markerTypes, function (id, v) { Object.keys(markerTypes).forEach(function (id) {
var title = getTitle(String(id)); var title = getTitle(String(id));
buttons.push({ buttons.push({
id: idPrefix + pos + '_' + id, id: idPrefix + pos + '_' + id,
svgicon: id, svgicon: id,
icon: svgEditor.curConfig.extIconsPath + 'markers-' + id + '.png',
title: title, title: title,
type: 'context', type: 'context',
events: { click: setArrowFromButton }, events: { click: setArrowFromButton },
@ -486,7 +487,7 @@ var svgEditorExtension_markers = (function () {
// duplicate shapes to support unfilled (open) marker types with an _o suffix // duplicate shapes to support unfilled (open) marker types with an _o suffix
$.each(['leftarrow', 'rightarrow', 'box', 'star', 'mcircle', 'triangle'], function (i, v) { ['leftarrow', 'rightarrow', 'box', 'star', 'mcircle', 'triangle'].forEach(function (v) {
markerTypes[v + '_o'] = markerTypes[v]; markerTypes[v + '_o'] = markerTypes[v];
}); });

View File

@ -334,6 +334,7 @@ var svgEditorExtension_mathjax = (function () {
buttons = [{ buttons = [{
id: 'tool_mathjax', id: 'tool_mathjax',
type: 'mode', type: 'mode',
icon: svgEditor.curConfig.extIconsPath + 'mathjax.png',
events: { events: {
click: function click() { click: function click() {
// Only load Mathjax when needed, we don't want to strain Svg-Edit any more. // Only load Mathjax when needed, we don't want to strain Svg-Edit any more.

View File

@ -60,6 +60,7 @@ var svgEditorExtension_panning = (function () {
svgCanvas = svgEditor.canvas; svgCanvas = svgEditor.canvas;
buttons = [{ buttons = [{
id: 'ext-panning', id: 'ext-panning',
icon: svgEditor.curConfig.extIconsPath + 'panning.png',
type: 'mode', type: 'mode',
events: { events: {
click: function click() { click: function click() {

View File

@ -148,6 +148,7 @@ var svgEditorExtension_polygon = (function () {
*/ */
buttons = [{ buttons = [{
id: 'tool_polygon', id: 'tool_polygon',
icon: svgEditor.curConfig.extIconsPath + 'polygon.png',
type: 'mode', type: 'mode',
position: 11, position: 11,
events: { events: {

View File

@ -4028,7 +4028,7 @@ var svgEditorExtension_server_moinsave = (function () {
ctx.canvas.id = svg.UniqueId(); ctx.canvas.id = svg.UniqueId();
ctx.canvas.style.display = 'none'; ctx.canvas.style.display = 'none';
document.body.append(ctx.canvas); document.body.append(ctx.canvas);
canvasRGBA_(ctx.canvas.id, x, y, width, height, this.blurRadius); canvasRGBA_(ctx.canvas, x, y, width, height, this.blurRadius);
ctx.canvas.remove(); ctx.canvas.remove();
} }
}]); }]);

View File

@ -4028,7 +4028,7 @@ var svgEditorExtension_server_opensave = (function () {
ctx.canvas.id = svg.UniqueId(); ctx.canvas.id = svg.UniqueId();
ctx.canvas.style.display = 'none'; ctx.canvas.style.display = 'none';
document.body.append(ctx.canvas); document.body.append(ctx.canvas);
canvasRGBA_(ctx.canvas.id, x, y, width, height, this.blurRadius); canvasRGBA_(ctx.canvas, x, y, width, height, this.blurRadius);
ctx.canvas.remove(); ctx.canvas.remove();
} }
}]); }]);

View File

@ -164,6 +164,7 @@ var svgEditorExtension_shapes = (function () {
curLib = library.basic; curLib = library.basic;
buttons = [{ buttons = [{
id: 'tool_shapelib', id: 'tool_shapelib',
icon: svgEditor.curConfig.extIconsPath + 'shapes.png',
type: 'mode_flyout', // _flyout type: 'mode_flyout', // _flyout
position: 6, position: 6,
events: { events: {

View File

@ -89,6 +89,7 @@ var svgEditorExtension_star = (function () {
*/ */
buttons = [{ buttons = [{
id: 'tool_star', id: 'tool_star',
icon: svgEditor.curConfig.extIconsPath + 'star.png',
type: 'mode', type: 'mode',
position: 12, position: 12,
events: { events: {

View File

@ -117,6 +117,7 @@ var svgEditorExtension_webappfind = (function () {
*/ */
buttons = [{ buttons = [{
id: 'webappfind_save', // id: 'webappfind_save', //
icon: svgEditor.curConfig.extIconsPath + 'webappfind.png',
type: 'app_menu', type: 'app_menu',
position: 4, // Before 0-based index position 4 (after the regular "Save Image (S)") position: 4, // Before 0-based index position 4 (after the regular "Save Image (S)")
events: { events: {

79
dist/index-es.js vendored
View File

@ -25014,7 +25014,7 @@ defaultPrefs = /** @lends module:SVGEditor~defaultPrefs */{
* @name module:SVGEditor~defaultExtensions * @name module:SVGEditor~defaultExtensions
* @type {string[]} * @type {string[]}
*/ */
defaultExtensions = ['ext-overview_window.js', 'ext-markers.js', 'ext-connector.js', 'ext-eyedropper.js', 'ext-shapes.js', 'ext-imagelib.js', 'ext-grid.js', 'ext-polygon.js', 'ext-star.js', 'ext-panning.js', 'ext-storage.js'], defaultExtensions = ['ext-connector.js', 'ext-eyedropper.js', 'ext-grid.js', 'ext-imagelib.js', 'ext-markers.js', 'ext-overview_window.js', 'ext-panning.js', 'ext-polygon.js', 'ext-shapes.js', 'ext-star.js', 'ext-storage.js'],
/** /**
* @typedef {"@default"|string} module:SVGEditor.Stylesheet `@default` will automatically load all of the default CSS paths for SVGEditor * @typedef {"@default"|string} module:SVGEditor.Stylesheet `@default` will automatically load all of the default CSS paths for SVGEditor
@ -26076,42 +26076,68 @@ editor.init = function () {
no_img: !isWebkit(), // Opera & Firefox 4 gives odd behavior w/images no_img: !isWebkit(), // Opera & Firefox 4 gives odd behavior w/images
fallback_path: curConfig.imgPath, fallback_path: curConfig.imgPath,
fallback: { fallback: {
new_image: 'clear.png', logo: 'logo.png',
save: 'save.png',
open: 'open.png',
source: 'source.png',
docprops: 'document-properties.png',
wireframe: 'wireframe.png',
undo: 'undo.png',
redo: 'redo.png',
select: 'select.png', select: 'select.png',
select_node: 'select_node.png', select_node: 'select_node.png',
pencil: 'fhpath.png',
pen: 'line.png',
square: 'square.png', square: 'square.png',
rect: 'rect.png', rect: 'rect.png',
fh_rect: 'freehand-square.png', fh_rect: 'freehand-square.png',
circle: 'circle.png', circle: 'circle.png',
ellipse: 'ellipse.png', ellipse: 'ellipse.png',
fh_ellipse: 'freehand-circle.png', fh_ellipse: 'freehand-circle.png',
path: 'path.png', pencil: 'fhpath.png',
pen: 'line.png',
text: 'text.png', text: 'text.png',
path: 'path.png',
add_subpath: 'add_subpath.png',
close_path: 'closepath.png',
open_path: 'openpath.png',
image: 'image.png', image: 'image.png',
zoom: 'zoom.png', zoom: 'zoom.png',
arrow_right: 'flyouth.png',
arrow_right_big: 'arrow_right_big.png',
arrow_down: 'dropdown.gif',
fill: 'fill.png',
stroke: 'stroke.png',
opacity: 'opacity.png',
new_image: 'clear.png',
save: 'save.png',
export: 'export.png',
open: 'open.png',
import: 'import.png',
docprops: 'document-properties.png',
source: 'source.png',
wireframe: 'wireframe.png',
undo: 'undo.png',
redo: 'redo.png',
clone: 'clone.png', clone: 'clone.png',
node_clone: 'node_clone.png',
delete: 'delete.png', delete: 'delete.png',
node_delete: 'node_delete.png', go_up: 'go-up.png',
group: 'shape_group_elements.png', go_down: 'go-down.png',
ungroup: 'shape_ungroup.png', context_menu: 'context_menu.png',
move_top: 'move_top.png',
move_bottom: 'move_bottom.png', move_bottom: 'move_bottom.png',
move_top: 'move_top.png',
to_path: 'to_path.png', to_path: 'to_path.png',
link_controls: 'link_controls.png', link_controls: 'link_controls.png',
reorient: 'reorient.png', reorient: 'reorient.png',
group_elements: 'shape_group_elements.png',
ungroup: 'shape_ungroup.png',
unlink_use: 'unlink_use.png',
width: 'width.png',
height: 'height.png',
c_radius: 'c_radius.png',
angle: 'angle.png',
blur: 'blur.png',
fontsize: 'fontsize.png',
align: 'align.png',
align_left: 'align-left.png', align_left: 'align-left.png',
align_center: 'align-center.png', align_center: 'align-center.png',
@ -26120,14 +26146,23 @@ editor.init = function () {
align_middle: 'align-middle.png', align_middle: 'align-middle.png',
align_bottom: 'align-bottom.png', align_bottom: 'align-bottom.png',
go_up: 'go-up.png', linecap_butt: 'linecap_butt.png',
go_down: 'go-down.png', linecap_square: 'linecap_square.png',
linecap_round: 'linecap_round.png',
linejoin_miter: 'linejoin_miter.png',
linejoin_bevel: 'linejoin_bevel.png',
linejoin_round: 'linejoin_round.png',
eye: 'eye.png',
no_color: 'no_color.png',
ok: 'save.png', ok: 'save.png',
cancel: 'cancel.png', cancel: 'cancel.png',
warning: 'warning.png',
arrow_right: 'flyouth.png', node_delete: 'node_delete.png',
arrow_down: 'dropdown.gif' node_clone: 'node_clone.png',
globe_link: 'globe_link.png'
}, },
placement: { placement: {
'#logo': 'logo', '#logo': 'logo',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

79
dist/index-umd.js vendored
View File

@ -25020,7 +25020,7 @@
* @name module:SVGEditor~defaultExtensions * @name module:SVGEditor~defaultExtensions
* @type {string[]} * @type {string[]}
*/ */
defaultExtensions = ['ext-overview_window.js', 'ext-markers.js', 'ext-connector.js', 'ext-eyedropper.js', 'ext-shapes.js', 'ext-imagelib.js', 'ext-grid.js', 'ext-polygon.js', 'ext-star.js', 'ext-panning.js', 'ext-storage.js'], defaultExtensions = ['ext-connector.js', 'ext-eyedropper.js', 'ext-grid.js', 'ext-imagelib.js', 'ext-markers.js', 'ext-overview_window.js', 'ext-panning.js', 'ext-polygon.js', 'ext-shapes.js', 'ext-star.js', 'ext-storage.js'],
/** /**
* @typedef {"@default"|string} module:SVGEditor.Stylesheet `@default` will automatically load all of the default CSS paths for SVGEditor * @typedef {"@default"|string} module:SVGEditor.Stylesheet `@default` will automatically load all of the default CSS paths for SVGEditor
@ -26082,42 +26082,68 @@
no_img: !isWebkit(), // Opera & Firefox 4 gives odd behavior w/images no_img: !isWebkit(), // Opera & Firefox 4 gives odd behavior w/images
fallback_path: curConfig.imgPath, fallback_path: curConfig.imgPath,
fallback: { fallback: {
new_image: 'clear.png', logo: 'logo.png',
save: 'save.png',
open: 'open.png',
source: 'source.png',
docprops: 'document-properties.png',
wireframe: 'wireframe.png',
undo: 'undo.png',
redo: 'redo.png',
select: 'select.png', select: 'select.png',
select_node: 'select_node.png', select_node: 'select_node.png',
pencil: 'fhpath.png',
pen: 'line.png',
square: 'square.png', square: 'square.png',
rect: 'rect.png', rect: 'rect.png',
fh_rect: 'freehand-square.png', fh_rect: 'freehand-square.png',
circle: 'circle.png', circle: 'circle.png',
ellipse: 'ellipse.png', ellipse: 'ellipse.png',
fh_ellipse: 'freehand-circle.png', fh_ellipse: 'freehand-circle.png',
path: 'path.png', pencil: 'fhpath.png',
pen: 'line.png',
text: 'text.png', text: 'text.png',
path: 'path.png',
add_subpath: 'add_subpath.png',
close_path: 'closepath.png',
open_path: 'openpath.png',
image: 'image.png', image: 'image.png',
zoom: 'zoom.png', zoom: 'zoom.png',
arrow_right: 'flyouth.png',
arrow_right_big: 'arrow_right_big.png',
arrow_down: 'dropdown.gif',
fill: 'fill.png',
stroke: 'stroke.png',
opacity: 'opacity.png',
new_image: 'clear.png',
save: 'save.png',
export: 'export.png',
open: 'open.png',
import: 'import.png',
docprops: 'document-properties.png',
source: 'source.png',
wireframe: 'wireframe.png',
undo: 'undo.png',
redo: 'redo.png',
clone: 'clone.png', clone: 'clone.png',
node_clone: 'node_clone.png',
delete: 'delete.png', delete: 'delete.png',
node_delete: 'node_delete.png', go_up: 'go-up.png',
group: 'shape_group_elements.png', go_down: 'go-down.png',
ungroup: 'shape_ungroup.png', context_menu: 'context_menu.png',
move_top: 'move_top.png',
move_bottom: 'move_bottom.png', move_bottom: 'move_bottom.png',
move_top: 'move_top.png',
to_path: 'to_path.png', to_path: 'to_path.png',
link_controls: 'link_controls.png', link_controls: 'link_controls.png',
reorient: 'reorient.png', reorient: 'reorient.png',
group_elements: 'shape_group_elements.png',
ungroup: 'shape_ungroup.png',
unlink_use: 'unlink_use.png',
width: 'width.png',
height: 'height.png',
c_radius: 'c_radius.png',
angle: 'angle.png',
blur: 'blur.png',
fontsize: 'fontsize.png',
align: 'align.png',
align_left: 'align-left.png', align_left: 'align-left.png',
align_center: 'align-center.png', align_center: 'align-center.png',
@ -26126,14 +26152,23 @@
align_middle: 'align-middle.png', align_middle: 'align-middle.png',
align_bottom: 'align-bottom.png', align_bottom: 'align-bottom.png',
go_up: 'go-up.png', linecap_butt: 'linecap_butt.png',
go_down: 'go-down.png', linecap_square: 'linecap_square.png',
linecap_round: 'linecap_round.png',
linejoin_miter: 'linejoin_miter.png',
linejoin_bevel: 'linejoin_bevel.png',
linejoin_round: 'linejoin_round.png',
eye: 'eye.png',
no_color: 'no_color.png',
ok: 'save.png', ok: 'save.png',
cancel: 'cancel.png', cancel: 'cancel.png',
warning: 'warning.png',
arrow_right: 'flyouth.png', node_delete: 'node_delete.png',
arrow_down: 'dropdown.gif' node_clone: 'node_clone.png',
globe_link: 'globe_link.png'
}, },
placement: { placement: {
'#logo': 'logo', '#logo': 'logo',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2691,7 +2691,7 @@ function build (opts) {
ctx.canvas.id = svg.UniqueId(); ctx.canvas.id = svg.UniqueId();
ctx.canvas.style.display = 'none'; ctx.canvas.style.display = 'none';
document.body.append(ctx.canvas); document.body.append(ctx.canvas);
canvasRGBA_(ctx.canvas.id, x, y, width, height, this.blurRadius); canvasRGBA_(ctx.canvas, x, y, width, height, this.blurRadius);
ctx.canvas.remove(); ctx.canvas.remove();
} }
}; };

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -51,6 +51,7 @@ export default {
const buttons = [ const buttons = [
{ {
id: 'tool_openpath', id: 'tool_openpath',
icon: svgEditor.curConfig.extIconsPath + 'openpath.png',
type: 'context', type: 'context',
panel: 'closepath_panel', panel: 'closepath_panel',
events: { events: {
@ -61,6 +62,7 @@ export default {
}, },
{ {
id: 'tool_closepath', id: 'tool_closepath',
icon: svgEditor.curConfig.extIconsPath + 'closepath.png',
type: 'context', type: 'context',
panel: 'closepath_panel', panel: 'closepath_panel',
events: { events: {

View File

@ -59,6 +59,7 @@ export default {
const buttons = [ const buttons = [
{ {
id: 'tool_eyedropper', id: 'tool_eyedropper',
icon: svgEditor.curConfig.extIconsPath + 'eyedropper.png',
type: 'mode', type: 'mode',
events: { events: {
click () { click () {

View File

@ -91,6 +91,7 @@ export default {
const buttons = [{ const buttons = [{
id: 'tool_foreign', id: 'tool_foreign',
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-tool.png',
type: 'mode', type: 'mode',
events: { events: {
click () { click () {
@ -99,6 +100,7 @@ export default {
} }
}, { }, {
id: 'edit_foreign', id: 'edit_foreign',
icon: svgEditor.curConfig.extIconsPath + 'foreignobject-edit.png',
type: 'context', type: 'context',
panel: 'foreignObject_panel', panel: 'foreignObject_panel',
events: { events: {

View File

@ -133,6 +133,7 @@ export default {
} }
const buttons = [{ const buttons = [{
id: 'view_grid', id: 'view_grid',
icon: svgEditor.curConfig.extIconsPath + 'grid.png',
type: 'context', type: 'context',
panel: 'editor_panel', panel: 'editor_panel',
events: { events: {

View File

@ -32,6 +32,9 @@ export default {
// Must match the icon ID in helloworld-icon.xml // Must match the icon ID in helloworld-icon.xml
id: 'hello_world', 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" // This indicates that the button will be added to the "mode"
// button panel on the left side // button panel on the left side
type: 'mode', type: 'mode',

View File

@ -364,6 +364,7 @@ export default {
const buttons = [{ const buttons = [{
id: 'tool_imagelib', id: 'tool_imagelib',
type: 'app_menu', // _flyout type: 'app_menu', // _flyout
icon: svgEditor.curConfig.extIconsPath + 'imagelib.png',
position: 4, position: 4,
events: { events: {
mouseup: showBrowser mouseup: showBrowser

View File

@ -75,7 +75,7 @@ export default {
}; };
// duplicate shapes to support unfilled (open) marker types with an _o suffix // duplicate shapes to support unfilled (open) marker types with an _o suffix
$.each(['leftarrow', 'rightarrow', 'box', 'star', 'mcircle', 'triangle'], function (i, v) { ['leftarrow', 'rightarrow', 'box', 'star', 'mcircle', 'triangle'].forEach((v) => {
markerTypes[v + '_o'] = markerTypes[v]; markerTypes[v + '_o'] = markerTypes[v];
}); });
@ -432,11 +432,12 @@ export default {
$.each(mtypes, function (k, pos) { $.each(mtypes, function (k, pos) {
const listname = pos + '_marker_list'; const listname = pos + '_marker_list';
let def = true; let def = true;
$.each(markerTypes, function (id, v) { Object.keys(markerTypes).forEach(function (id) {
const title = getTitle(String(id)); const title = getTitle(String(id));
buttons.push({ buttons.push({
id: idPrefix + pos + '_' + id, id: idPrefix + pos + '_' + id,
svgicon: id, svgicon: id,
icon: svgEditor.curConfig.extIconsPath + 'markers-' + id + '.png',
title, title,
type: 'context', type: 'context',
events: {click: setArrowFromButton}, events: {click: setArrowFromButton},

View File

@ -120,6 +120,7 @@ export default {
const buttons = [{ const buttons = [{
id: 'tool_mathjax', id: 'tool_mathjax',
type: 'mode', type: 'mode',
icon: svgEditor.curConfig.extIconsPath + 'mathjax.png',
events: { events: {
click () { click () {
// Only load Mathjax when needed, we don't want to strain Svg-Edit any more. // Only load Mathjax when needed, we don't want to strain Svg-Edit any more.

View File

@ -17,6 +17,7 @@ export default {
const svgCanvas = svgEditor.canvas; const svgCanvas = svgEditor.canvas;
const buttons = [{ const buttons = [{
id: 'ext-panning', id: 'ext-panning',
icon: svgEditor.curConfig.extIconsPath + 'panning.png',
type: 'mode', type: 'mode',
events: { events: {
click () { click () {

View File

@ -112,6 +112,7 @@ export default {
*/ */
const buttons = [{ const buttons = [{
id: 'tool_polygon', id: 'tool_polygon',
icon: svgEditor.curConfig.extIconsPath + 'polygon.png',
type: 'mode', type: 'mode',
position: 11, position: 11,
events: { events: {

View File

@ -125,6 +125,7 @@ export default {
} }
const buttons = [{ const buttons = [{
id: 'tool_shapelib', id: 'tool_shapelib',
icon: svgEditor.curConfig.extIconsPath + 'shapes.png',
type: 'mode_flyout', // _flyout type: 'mode_flyout', // _flyout
position: 6, position: 6,
events: { events: {

View File

@ -56,6 +56,7 @@ export default {
*/ */
const buttons = [{ const buttons = [{
id: 'tool_star', id: 'tool_star',
icon: svgEditor.curConfig.extIconsPath + 'star.png',
type: 'mode', type: 'mode',
position: 12, position: 12,
events: { events: {

View File

@ -70,6 +70,7 @@ export default {
*/ */
const buttons = [{ const buttons = [{
id: 'webappfind_save', // id: 'webappfind_save', //
icon: svgEditor.curConfig.extIconsPath + 'webappfind.png',
type: 'app_menu', type: 'app_menu',
position: 4, // Before 0-based index position 4 (after the regular "Save Image (S)") position: 4, // Before 0-based index position 4 (after the regular "Save Image (S)")
events: { events: {

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
editor/extensions/grid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
editor/extensions/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
editor/images/align.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

BIN
editor/images/angle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
editor/images/blur.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
editor/images/c_radius.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

BIN
editor/images/closepath.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

BIN
editor/images/export.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

BIN
editor/images/fill.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

BIN
editor/images/fontsize.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

BIN
editor/images/height.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

BIN
editor/images/import.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
editor/images/no_color.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
editor/images/opacity.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

BIN
editor/images/openpath.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
editor/images/stroke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
editor/images/warning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

BIN
editor/images/width.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Some files were not shown because too many files have changed in this diff Show More