Extensions (#737)
- add the current document title in the toolbar - allow user extensions to define optional parameters - more events for renamedElement, beforeClear, afterClear, sourceChanged - remove "message" event used for iframe integration not used anymore. can be readded through a new extension if necessary - default precision down to 2 digits (and applied in rotation)
This commit is contained in:
@@ -118,11 +118,11 @@ class TopPanel {
|
||||
}
|
||||
|
||||
$id('stroke_width').value = gWidth === null ? '' : gWidth
|
||||
this.editor.bottomPanel.updateColorpickers(true)
|
||||
this.editor.bottomPanel.updateColorpickers(false)
|
||||
break
|
||||
}
|
||||
default: {
|
||||
this.editor.bottomPanel.updateColorpickers(true)
|
||||
this.editor.bottomPanel.updateColorpickers(false)
|
||||
|
||||
$id('stroke_width').value =
|
||||
this.selectedElement.getAttribute('stroke-width') || 1
|
||||
@@ -539,9 +539,11 @@ class TopPanel {
|
||||
*/
|
||||
changeRotationAngle (e) {
|
||||
this.editor.svgCanvas.setRotationAngle(e.target.value)
|
||||
;(Number.parseInt(e.target.value) === 0)
|
||||
? $id('tool_reorient').classList.add('disabled')
|
||||
: $id('tool_reorient').classList.remove('disabled')
|
||||
if (Number.parseInt(e.target.value) === 0) {
|
||||
$id('tool_reorient').classList.add('disabled')
|
||||
} else {
|
||||
$id('tool_reorient').classList.remove('disabled')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -628,16 +630,7 @@ class TopPanel {
|
||||
}
|
||||
}
|
||||
|
||||
// if the user is changing the id, then de-select the element first
|
||||
// change the ID, then re-select it with the new ID
|
||||
if (attr === 'id') {
|
||||
const elem = this.editor.selectedElement
|
||||
this.editor.svgCanvas.clearSelection()
|
||||
elem.id = val
|
||||
this.editor.svgCanvas.addToSelection([elem], true)
|
||||
} else {
|
||||
this.editor.svgCanvas.changeSelectedAttribute(attr, val)
|
||||
}
|
||||
this.editor.svgCanvas.changeSelectedAttribute(attr, val)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user