- Enhancement: Use minified version of jpicker in svg-editor
- Build: Update minified version of jgraduate/jpicker per linted/improved files (and add to uglify script) - Fix: jgraduate recent regressions - Docs: Update CHANGES
This commit is contained in:
@@ -28,9 +28,12 @@
|
|||||||
(though only if there is a single identity matrix) (fixes Chrome issue
|
(though only if there is a single identity matrix) (fixes Chrome issue
|
||||||
with recalculate test 1:
|
with recalculate test 1:
|
||||||
"recalculateDimensions() on rect with identity matrix")
|
"recalculateDimensions() on rect with identity matrix")
|
||||||
|
* Build: Update minified version of spinbtn/jgraduate/jpicker per linted/improved files
|
||||||
* Enhancement: Throw Error objects instead of strings (including in jgraduate->jpicker)
|
* Enhancement: Throw Error objects instead of strings (including in jgraduate->jpicker)
|
||||||
|
* Enhancement: Use minified version of jpicker in svg-editor
|
||||||
* Refactoring: Switch to ESLint in source
|
* Refactoring: Switch to ESLint in source
|
||||||
* Refactoring: Move scripts to own files
|
* Refactoring: Move scripts to own files
|
||||||
|
* npm: Add ESLint, uglify, start scripts
|
||||||
* Testing: Move JavaScript out of HTML to own files
|
* Testing: Move JavaScript out of HTML to own files
|
||||||
* Testing: Add `node-static` to get tests working
|
* Testing: Add `node-static` to get tests working
|
||||||
* Testing: Fix timing of `all_tests.html` for ensuring expanding iframe size to fit content
|
* Testing: Fix timing of `all_tests.html` for ensuring expanding iframe size to fit content
|
||||||
|
|||||||
2
editor/jgraduate/jpicker.min.js
vendored
2
editor/jgraduate/jpicker.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -182,8 +182,8 @@ jQuery.fn.jGraduate =
|
|||||||
$.extend(true, $this, { // public properties, methods, and callbacks
|
$.extend(true, $this, { // public properties, methods, and callbacks
|
||||||
// make a copy of the incoming paint
|
// make a copy of the incoming paint
|
||||||
paint: new $.jGraduate.Paint({copy: $settings.paint}),
|
paint: new $.jGraduate.Paint({copy: $settings.paint}),
|
||||||
okCallback: $.isFunction(($arguments[1]) && $arguments[1]) || null,
|
okCallback: ($.isFunction($arguments[1]) && $arguments[1]) || null,
|
||||||
cancelCallback: $.isFunction(($arguments[2]) && $arguments[2]) || null
|
cancelCallback: ($.isFunction($arguments[2]) && $arguments[2]) || null
|
||||||
});
|
});
|
||||||
|
|
||||||
var // pos = $this.position(),
|
var // pos = $this.position(),
|
||||||
@@ -787,8 +787,8 @@ jQuery.fn.jGraduate =
|
|||||||
|
|
||||||
stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop');
|
stops = curGradient.getElementsByTagNameNS(ns.svg, 'stop');
|
||||||
|
|
||||||
// if there are not at least two stops, then
|
|
||||||
var numstops = stops.length;
|
var numstops = stops.length;
|
||||||
|
// if there are not at least two stops, then
|
||||||
if (numstops < 2) {
|
if (numstops < 2) {
|
||||||
while (numstops < 2) {
|
while (numstops < 2) {
|
||||||
curGradient.appendChild(document.createElementNS(ns.svg, 'stop'));
|
curGradient.appendChild(document.createElementNS(ns.svg, 'stop'));
|
||||||
@@ -813,7 +813,7 @@ jQuery.fn.jGraduate =
|
|||||||
$('#' + id + ' div.grad_coord').mousedown(function (evt) {
|
$('#' + id + ' div.grad_coord').mousedown(function (evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
draggingCoord = $(this);
|
draggingCoord = $(this);
|
||||||
// var s_pos = draggingCoord.offset();
|
// var sPos = draggingCoord.offset();
|
||||||
offset = draggingCoord.parent().offset();
|
offset = draggingCoord.parent().offset();
|
||||||
$win.mousemove(onCoordDrag).mouseup(onCoordUp);
|
$win.mousemove(onCoordDrag).mouseup(onCoordUp);
|
||||||
});
|
});
|
||||||
@@ -1097,7 +1097,7 @@ jQuery.fn.jGraduate =
|
|||||||
$(this).addClass('jGraduate_tab_current');
|
$(this).addClass('jGraduate_tab_current');
|
||||||
$(idref + ' > div').hide();
|
$(idref + ' > div').hide();
|
||||||
var type = $(this).attr('data-type');
|
var type = $(this).attr('data-type');
|
||||||
// var container = $(idref + ' .jGraduate_gradPick').show();
|
/* var container = */ $(idref + ' .jGraduate_gradPick').show();
|
||||||
if (type === 'rg' || type === 'lg') {
|
if (type === 'rg' || type === 'lg') {
|
||||||
// Show/hide appropriate fields
|
// Show/hide appropriate fields
|
||||||
$('.jGraduate_' + type + '_field').show();
|
$('.jGraduate_' + type + '_field').show();
|
||||||
|
|||||||
38
editor/jgraduate/jquery.jgraduate.min.js
vendored
38
editor/jgraduate/jquery.jgraduate.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<!-- always minified scripts -->
|
<!-- always minified scripts -->
|
||||||
<script src="jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
|
<script src="jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
|
||||||
<script src="jgraduate/jpicker.js"></script>
|
<script src="jgraduate/jpicker.min.js"></script>
|
||||||
|
|
||||||
<!-- If you do not wish to add extensions by URL, you can load them
|
<!-- If you do not wish to add extensions by URL, you can load them
|
||||||
by creating the following file and adding by calls to svgEditor.setConfig -->
|
by creating the following file and adding by calls to svgEditor.setConfig -->
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"engines": {},
|
"engines": {},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"eslint": "eslint .",
|
"eslint": "eslint .",
|
||||||
"uglify": "uglifyjs --compress -o ./editor/spinbtn/JQuerySpinBtn.min.js -- ./editor/spinbtn/JQuerySpinBtn.js",
|
"uglify": "uglifyjs --compress -o ./editor/spinbtn/JQuerySpinBtn.min.js -- ./editor/spinbtn/JQuerySpinBtn.js && uglifyjs --compress -o ./editor/jgraduate/jpicker.min.js -- ./editor/jgraduate/jpicker.js && uglifyjs --compress -o ./editor/jgraduate/jquery.jgraduate.min.js -- ./editor/jgraduate/jquery.jgraduate.js",
|
||||||
"start": "echo \"Open file to http://localhost:8000/test/all_tests.html\" && static -p 8000",
|
"start": "echo \"Open file to http://localhost:8000/test/all_tests.html\" && static -p 8000",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user