fix update of colorpickers
parent
d2f48b95d5
commit
fc2d630b67
|
@ -1 +1 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="403" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h80v20h-80zM309 0h94v20h-94z"/><path fill="url(#smooth)" d="M0 0h403v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 47.23%</text><text class="high" x="5" y="14">Statements 47.23%</text><text class="shadow" x="125.5" y="15">Branches 34.77%</text><text class="high" x="125" y="14">Branches 34.77%</text><text class="shadow" x="234.5" y="15">Lines 48.3%</text><text class="high" x="234" y="14">Lines 48.3%</text><text class="shadow" x="314.5" y="15">Functions 53%</text><text class="high" x="314" y="14">Functions 53%</text></g></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 47.22%</text><text class="high" x="5" y="14">Statements 47.22%</text><text class="shadow" x="125.5" y="15">Branches 34.88%</text><text class="high" x="125" y="14">Branches 34.88%</text><text class="shadow" x="234.5" y="15">Lines 48.21%</text><text class="high" x="234" y="14">Lines 48.21%</text><text class="shadow" x="321.5" y="15">Functions 54.19%</text><text class="high" x="321" y="14">Functions 54.19%</text></g></svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -1 +1 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#e05d44" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">140/143</text><text class="high" x="46" y="14">140/143</text></g></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#e05d44" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">141/143</text><text class="high" x="46" y="14">141/143</text></g></svg>
|
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 823 B |
|
@ -17,13 +17,25 @@ class BottomPanelHandlers {
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
this.svgCanvas = editor.canvas;
|
this.svgCanvas = editor.canvas;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @type {module}
|
||||||
|
*/
|
||||||
|
get selectedElement () {
|
||||||
|
return this.editor.selectedElement;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @type {module}
|
||||||
|
*/
|
||||||
|
get multiselected () {
|
||||||
|
return this.editor.multiselected;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {module}
|
* @type {module}
|
||||||
*/
|
*/
|
||||||
changeStrokeWidth (e) {
|
changeStrokeWidth (e) {
|
||||||
let val = e.target.value;
|
let val = e.target.value;
|
||||||
if (val === 0 && this.editor.selectedElement && ['line', 'polyline'].includes(this.editor.selectedElement.nodeName)) {
|
if (val === 0 && this.selectedElement && ['line', 'polyline'].includes(this.selectedElement.nodeName)) {
|
||||||
val = 1;
|
val = 1;
|
||||||
}
|
}
|
||||||
this.svgCanvas.setStrokeWidth(val);
|
this.svgCanvas.setStrokeWidth(val);
|
||||||
|
|
|
@ -316,7 +316,7 @@ class TopPanelHandlers {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
clickUndo () {
|
clickUndo () {
|
||||||
const {undoMgr} = this.editor;
|
const {undoMgr} = this.editor.canvas;
|
||||||
if (undoMgr.getUndoStackSize() > 0) {
|
if (undoMgr.getUndoStackSize() > 0) {
|
||||||
undoMgr.undo();
|
undoMgr.undo();
|
||||||
this.editor.layersPanel.populateLayers();
|
this.editor.layersPanel.populateLayers();
|
||||||
|
|
|
@ -849,7 +849,8 @@ editor.init = () => {
|
||||||
$('#group_opacity').val(opacPerc);
|
$('#group_opacity').val(opacPerc);
|
||||||
$('#opac_slider').slider('option', 'value', opacPerc);
|
$('#opac_slider').slider('option', 'value', opacPerc);
|
||||||
$id('elem_id').value = editor.selectedElement.id;
|
$id('elem_id').value = editor.selectedElement.id;
|
||||||
$id('elem_class').value = (editor.selectedElement.getAttribute('class') !== null) ? editor.selectedElement.getAttribute('class') : '';
|
$id('elem_class').value =
|
||||||
|
(editor.selectedElement.getAttribute('class') !== null) ? editor.selectedElement.getAttribute('class') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.bottomPanelHandlers.updateToolButtonState();
|
editor.bottomPanelHandlers.updateToolButtonState();
|
||||||
|
@ -1540,11 +1541,11 @@ editor.init = () => {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
editor.zoomImage = function (multiplier) {
|
editor.zoomImage = function (multiplier) {
|
||||||
const resolution = this.svgCanvasgetResolution();
|
const resolution = svgCanvas.getResolution();
|
||||||
multiplier = multiplier ? resolution.zoom * multiplier : 1;
|
multiplier = multiplier ? resolution.zoom * multiplier : 1;
|
||||||
// setResolution(res.w * multiplier, res.h * multiplier, true);
|
// setResolution(res.w * multiplier, res.h * multiplier, true);
|
||||||
$id('zoom').value = (multiplier * 100).toFixed(1);
|
$id('zoom').value = (multiplier * 100).toFixed(1);
|
||||||
this.svgCanvassetZoom(multiplier);
|
svgCanvas.setZoom(multiplier);
|
||||||
zoomDone();
|
zoomDone();
|
||||||
updateCanvas(true);
|
updateCanvas(true);
|
||||||
};
|
};
|
||||||
|
@ -1847,7 +1848,7 @@ editor.init = () => {
|
||||||
*/
|
*/
|
||||||
const saveSourceEditor = (e) => {
|
const saveSourceEditor = (e) => {
|
||||||
const $editorDialog = document.getElementById('se-svg-editor-dialog');
|
const $editorDialog = document.getElementById('se-svg-editor-dialog');
|
||||||
if ($editorDialog.getAttribute('dialog') === 'open') return;
|
if ($editorDialog.getAttribute('dialog') !== 'open') return;
|
||||||
const saveChanges = () => {
|
const saveChanges = () => {
|
||||||
svgCanvas.clearSelection();
|
svgCanvas.clearSelection();
|
||||||
hideSourceEditor();
|
hideSourceEditor();
|
||||||
|
|
Loading…
Reference in New Issue