Merge pull request #50 from InventivetalentDev/master

Updated inputs, search & CSS
This commit is contained in:
Javi Agenjo
2018-10-24 18:53:44 +02:00
committed by GitHub
3 changed files with 7645 additions and 7604 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -131,7 +131,7 @@
.litegraph .litemenu-entry:hover:not(.disabled):not(.separator) {
background-color: #444 !important;
color: #EEE;
transition: * 0.4s;
transition: all 0.4s;
}
.litegraph .litemenu-entry .property_name {
@@ -151,6 +151,49 @@
padding-right: 10px;
}
.litegraph.litesearchbox {
font-family:Tahoma, sans-serif;
position: absolute;
background-color: rgba(0,0,0,0.5);
padding-top: 4px;
}
.litegraph.litesearchbox input, .litegraph.litesearchbox select {
margin-top: 3px;
min-width: 60px;
min-height: 1.5em;
background-color: black;
border: 0;
color: white;
padding-left: 10px;
margin-right: 5px;
}
.litegraph.litesearchbox .name {
display: inline-block;
min-width: 60px;
min-height: 1.5em;
padding-left: 10px;
}
litegraph.litesearchbox .helper {
overflow: auto;
max-height: 200px;
margin-top: 2px;
}
.litegraph.lite-search-item {
font-family:Tahoma, sans-serif;
background-color: rgba(0,0,0,0.5);
color: white;
padding-top: 2px;
}
.litegraph.lite-search-item:hover, .litegraph.lite-search-item.selected {
cursor: pointer;
background-color: white;
color: black;
}
/* OLD */
@@ -175,7 +218,7 @@
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
transition: * linear 0.5s;
transition: all linear 0.5s;
}
.graphmenu-entry.event, .litemenu-entry.event {

View File

@@ -6455,7 +6455,7 @@ LGraphCanvas.onShowTitleEditor = function( value, options, e, menu, node )
var dialog = document.createElement("div");
dialog.className = "graphdialog";
dialog.innerHTML = "<span class='name'>Title</span><input autofocus type='text' class='value'/><button>OK</button>";
dialog.innerHTML = "<span class='name'>Title</span><input autofocus onblur='this.focus()' type='text' class='value'/><button>OK</button>";
var input = dialog.querySelector("input");
if(input)
{
@@ -6515,8 +6515,8 @@ LGraphCanvas.prototype.showSearchBox = function(event)
var input_html = "";
var dialog = document.createElement("div");
dialog.className = "graphdialog";
dialog.innerHTML = "<span class='name'>Search</span> <input autofocus type='text' class='value'/><div class='helper'></div>";
dialog.className = "litegraph litesearchbox";
dialog.innerHTML = "<span class='name'>Search</span> <input autofocus onblur='this.focus()' type='text' class='value'/><div class='helper'></div>";
dialog.close = function()
{
that.search_box = null;
@@ -6652,7 +6652,7 @@ LGraphCanvas.prototype.showSearchBox = function(event)
var help = document.createElement("div");
if(!first) first = i;
help.innerText = i;
help.className = "help-item";
help.className = "litegraph lite-search-item";
help.addEventListener("click", function(e){
select( this.innerText );
});
@@ -6704,10 +6704,10 @@ LGraphCanvas.prototype.showEditPropertyValue = function( node, property, options
var input_html = "";
if(type == "string" || type == "number" || type == "array")
input_html = "<input autofocus type='text' class='value'/>";
input_html = "<input autofocus onblur='this.focus()' type='text' class='value'/>";
else if(type == "enum" && info.values)
{
input_html = "<select autofocus type='text' class='value'>";
input_html = "<select autofocus onblur='this.focus()' type='text' class='value'>";
for(var i in info.values)
{
var v = info.values.constructor === Array ? info.values[i] : i;
@@ -6717,7 +6717,7 @@ LGraphCanvas.prototype.showEditPropertyValue = function( node, property, options
}
else if(type == "boolean")
{
input_html = "<input autofocus type='checkbox' class='value' "+(node.properties[property] ? "checked" : "")+"/>";
input_html = "<input autofocus onblur='this.focus()' type='checkbox' class='value' "+(node.properties[property] ? "checked" : "")+"/>";
}
else
{