- Update `dist` files

master
Brett Zamir 2018-05-29 21:40:03 +08:00
parent 785e9b11dc
commit 76db126ec7
11 changed files with 1733 additions and 1676 deletions

View File

@ -17,7 +17,6 @@
var svgroot = S.svgroot, var svgroot = S.svgroot,
getNextId = S.getNextId, getNextId = S.getNextId,
getElem = S.getElem, getElem = S.getElem,
curConfig = S.curConfig,
addElem = S.addSvgElementFromJson, addElem = S.addSvgElementFromJson,
selManager = S.selectorManager, selManager = S.selectorManager,
connSel = '.se_connector', connSel = '.se_connector',
@ -60,7 +59,7 @@
if (slope < bb.height / bb.width) { if (slope < bb.height / bb.width) {
ratio = bb.width / 2 / Math.abs(lenX); ratio = bb.width / 2 / Math.abs(lenX);
} else { } else {
ratio = bb.height / 2 / Math.abs(lenY); ratio = lenY ? bb.height / 2 / Math.abs(lenY) : 0;
} }
return { return {
@ -340,6 +339,9 @@
startX = opts.start_x; startX = opts.start_x;
startY = opts.start_y; startY = opts.start_y;
var mode = svgCanvas.getMode(); var mode = svgCanvas.getMode();
var _svgEditor = svgEditor,
initStroke = _svgEditor.curConfig.initStroke;
if (mode === 'connector') { if (mode === 'connector') {
if (started) { if (started) {
@ -368,10 +370,10 @@
attr: { attr: {
id: getNextId(), id: getNextId(),
points: x + ',' + y + ' ' + x + ',' + y + ' ' + startX + ',' + startY, points: x + ',' + y + ' ' + x + ',' + y + ' ' + startX + ',' + startY,
stroke: '#' + curConfig.initStroke.color, stroke: '#' + initStroke.color,
'stroke-width': !startElem.stroke_width || startElem.stroke_width === 0 ? curConfig.initStroke.width : startElem.stroke_width, 'stroke-width': !startElem.stroke_width || startElem.stroke_width === 0 ? initStroke.width : startElem.stroke_width,
fill: 'none', fill: 'none',
opacity: curConfig.initStroke.opacity, opacity: initStroke.opacity,
style: 'pointer-events:none' style: 'pointer-events:none'
} }
}); });

View File

@ -48,15 +48,12 @@
newFO = void 0, newFO = void 0,
editingforeign = false; editingforeign = false;
// Function: setForeignString(xmlString, elt) /**
// This function sets the content of element elt to the input XML. * This function sets the content of element elt to the input XML.
// * @param {String} xmlString - The XML text.
// Parameters: * @param elt - the parent element to append to
// xmlString - The XML text. * @returns {Boolean} This function returns false if the set was unsuccessful, true otherwise.
// elt - the parent element to append to */
//
// Returns:
// This function returns false if the set was unsuccessful, true otherwise.
function setForeignString(xmlString) { function setForeignString(xmlString) {
var elt = selElems[0]; var elt = selElems[0];
try { try {

View File

@ -73,9 +73,11 @@
markerTypes[v + '_o'] = markerTypes[v]; markerTypes[v + '_o'] = markerTypes[v];
}); });
// elem = a graphic element will have an attribute like marker-start /**
// attr - marker-start, marker-mid, or marker-end * @param elem - A graphic element will have an attribute like marker-start
// returns the marker element that is linked to the graphic element * @param attr - marker-start, marker-mid, or marker-end
* @returns The marker element that is linked to the graphic element
*/
function getLinked(elem, attr) { function getLinked(elem, attr) {
var str = elem.getAttribute(attr); var str = elem.getAttribute(attr);
if (!str) { if (!str) {

View File

@ -158,7 +158,7 @@
s.src = curConfig.extPath + mathjaxSrcSecure; s.src = curConfig.extPath + mathjaxSrcSecure;
// See `executeAfterLoads` in `svgutils.js` // See `executeAfterLoads` in `svgutils.js`
*/ */
$.getScript(mathjaxSrcSecure).done(function (script, textStatus) { $.getScript(svgEditor.curConfig.extIconsPath + mathjaxSrcSecure).done(function (script, textStatus) {
// When MathJax is loaded get the div where the math will be rendered. // When MathJax is loaded get the div where the math will be rendered.
MathJax.Hub.queue.Push(function () { MathJax.Hub.queue.Push(function () {
math = MathJax.Hub.getAllJax('#mathjax_creator')[0]; math = MathJax.Hub.getAllJax('#mathjax_creator')[0];

View File

@ -124,7 +124,7 @@
if (!lib) { if (!lib) {
$('#shape_buttons').html('Loading...'); $('#shape_buttons').html('Loading...');
$.getJSON(svgEditor.curConfig.extPath + 'shapelib/' + catId + '.json', function (result) { $.getJSON(svgEditor.curConfig.extIconsPath + 'shapelib/' + catId + '.json', function (result) {
curLib = library[catId] = { curLib = library[catId] = {
data: result.data, data: result.data,
size: result.size, size: result.size,

1682
dist/index-es.js vendored

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

1680
dist/index-umd.js vendored

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