master
Mark MacKay 2021-02-15 16:30:52 -06:00
parent 42a48249c1
commit b8158a1f97
6 changed files with 14 additions and 13 deletions

View File

@ -568,6 +568,12 @@ input[type=file] {
fill: #fff; fill: #fff;
} }
.draginput.textcontent {
position: absolute;
opacity: 0;
z-index: 0;
}
.align_buttons .draginput_cell:nth-child(1) {border-radius: 3px 0 0 0;} .align_buttons .draginput_cell:nth-child(1) {border-radius: 3px 0 0 0;}
.align_buttons .draginput_cell:nth-child(3) {border-radius: 0 3px 0 0;} .align_buttons .draginput_cell:nth-child(3) {border-radius: 0 3px 0 0;}
.align_buttons .draginput_cell:nth-child(4) {border-radius: 0 0 0 3px;} .align_buttons .draginput_cell:nth-child(4) {border-radius: 0 0 0 3px;}

View File

@ -280,7 +280,7 @@
<div id="text_panel" class="context_panel"> <div id="text_panel" class="context_panel">
<h4>Text</h4> <h4>Text</h4>
<label class="draginput twocol" data-title="Change Font Size"> <label class="draginput twocol textcontent" data-title="Change Content">
<span>Content</span> <span>Content</span>
<input id="text" type="text"/> <input id="text" type="text"/>
</label> </label>

View File

@ -141,7 +141,7 @@ MD.PaintBox = function(container, type){
else createBackground(fillAttr) else createBackground(fillAttr)
} }
if(true) { if(apply) {
svgCanvas.setColor(this.type, fillAttr, true); svgCanvas.setColor(this.type, fillAttr, true);
svgCanvas.setPaintOpacity(this.type, opac, true); svgCanvas.setPaintOpacity(this.type, opac, true);
} }

View File

@ -105,7 +105,6 @@ MD.Panel = function(){
const isNode = svgCanvas.pathActions.getNodePoint() const isNode = svgCanvas.pathActions.getNodePoint()
// If element has just been deleted, consider it null // If element has just been deleted, consider it null
if(!elem || !elem.parentNode) elem = null; if(!elem || !elem.parentNode) elem = null;
elem = null;
const multiselected = elems.length > 1; const multiselected = elems.length > 1;
@ -122,7 +121,6 @@ MD.Panel = function(){
var seg_type = $('#seg_type'); var seg_type = $('#seg_type');
point.x = svgedit.units.convertUnit(point.x); point.x = svgedit.units.convertUnit(point.x);
point.y = svgedit.units.convertUnit(point.y); point.y = svgedit.units.convertUnit(point.y);
console.log(point)
$('#path_node_x').val(Math.round(point.x)); $('#path_node_x').val(Math.round(point.x));
$('#path_node_y').val(Math.round(point.y)); $('#path_node_y').val(Math.round(point.y));
if(point.type) { if(point.type) {

View File

@ -110,6 +110,8 @@ MD.Editor = function(){
function selectedChanged(window,elems) { function selectedChanged(window,elems) {
const mode = svgCanvas.getMode(); const mode = svgCanvas.getMode();
_self.selected = elems.filter(Boolean); _self.selected = elems.filter(Boolean);
editor.paintBox.fill.update();
editor.paintBox.stroke.update();
editor.panel.updateContextPanel(_self.selected); editor.panel.updateContextPanel(_self.selected);
}; };
@ -148,12 +150,6 @@ MD.Editor = function(){
editor.panel.updateContextPanel(elems); editor.panel.updateContextPanel(elems);
// In the event a gradient was flipped:
if(_self.selected && mode === "select") {
editor.paintBox.fill.update();
editor.paintBox.stroke.update();
}
svgCanvas.runExtensions("elementChanged", { svgCanvas.runExtensions("elementChanged", {
elems: elems elems: elems
}); });

View File

@ -547,7 +547,8 @@ jQuery.fn.jGraduate =
images: { clientPath: $settings.images.clientPath }, images: { clientPath: $settings.images.clientPath },
color: { active: color, alphaSupport: true } color: { active: color, alphaSupport: true }
}, function(color, arg2){ }, function(color, arg2){
stopColor = color.val('hex') ? ('#'+color.val('hex')) : "none"; // todo if color is 'none' it should get the same color as the next color stop
stopColor = color.val('hex') ? ('#'+color.val('hex')) : "rgba(255,255,255,0)";
stopOpacity = color.val('a') !== null ? color.val('a')/256 : 1; stopOpacity = color.val('a') !== null ? color.val('a')/256 : 1;
colorhandle.setAttribute('fill', stopColor); colorhandle.setAttribute('fill', stopColor);
colorhandle.setAttribute('fill-opacity', stopOpacity); colorhandle.setAttribute('fill-opacity', stopOpacity);
@ -1085,7 +1086,7 @@ jQuery.fn.jGraduate =
var thisAlpha = ($this.paint.alpha*255/100).toString(16); var thisAlpha = ($this.paint.alpha*255/100).toString(16);
while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; } while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; }
thisAlpha = thisAlpha.split(".")[0]; thisAlpha = thisAlpha.split(".")[0];
color = $this.paint.solidColor == "none" ? "" : $this.paint.solidColor + thisAlpha; color = $this.paint.solidColor === "none" ? "" : $this.paint.solidColor + thisAlpha;
if(!isSolid) { if(!isSolid) {
color = stops[0].getAttribute('stop-color'); color = stops[0].getAttribute('stop-color');