Add more options for vertex.

This commit is contained in:
Oleg Sh
2021-04-23 21:38:16 +02:00
parent 7583db561f
commit 35c6656d0f
14 changed files with 125 additions and 17 deletions

View File

@@ -1407,9 +1407,11 @@ SetupVertexStyle.prototype.show = function(index, selectedVertexes)
$( "#vertexFillColor" ).val(fullStyle.fillStyle);
$( "#vertexStrokeColor" ).val(fullStyle.strokeStyle);
$( "#vertexTextColor" ).val(fullStyle.mainTextColor);
$( "#upVertexTextColor" ).val(fullStyle.upTextColor);
$( "#vertexStrokeSize" ).val(fullStyle.lineWidth);
$( "#vertexShape" ).val(fullStyle.shape);
$( "#vertexSize" ).val(forAll ? app.GetDefaultVertexSize() : selectedVertexes[0].model.diameter);
$( "#commonTextPosition" ).val(fullStyle.commonTextPosition);
}
var redrawVertex = function()
@@ -1431,6 +1433,12 @@ SetupVertexStyle.prototype.show = function(index, selectedVertexes)
if (fullStyle.shape != $( "#vertexShape" ).val())
style.shape = parseInt($( "#vertexShape" ).val());
if (fullStyle.upTextColor != $( "#upVertexTextColor" ).val())
style.upTextColor = $( "#upVertexTextColor" ).val();
if (fullStyle.commonTextPosition != $( "#commonTextPosition" ).val())
style.commonTextPosition = $( "#commonTextPosition" ).val();
var diameter = parseInt($( "#vertexSize" ).val());
var canvas = document.getElementById( "VertexPreview" );
@@ -1534,16 +1542,20 @@ SetupVertexStyle.prototype.show = function(index, selectedVertexes)
$( "#vertexFillColor" ).unbind();
$( "#vertexStrokeColor" ).unbind();
$( "#vertexTextColor" ).unbind();
$( "#upVertexTextColor" ).unbind();
$( "#vertexStrokeSize" ).unbind();
$( "#vertexShape" ).unbind();
$( "#vertexSize" ).unbind();
$( "#commonTextPosition" ).unbind();
$( "#vertexFillColor" ).change(redrawVertex);
$( "#vertexStrokeColor" ).change(redrawVertex);
$( "#vertexTextColor" ).change(redrawVertex);
$( "#vertexStrokeSize" ).change(redrawVertex);
$( "#vertexShape" ).change(redrawVertex);
$( "#vertexSize" ).change(redrawVertex);
$( "#vertexSize" ).change(redrawVertex);
$( "#upVertexTextColor" ).change(redrawVertex);
$( "#commonTextPosition" ).change(redrawVertex);
}
/**