Ver código fonte

small bug fixes

tags/v0.2.0^2
Big Bad Waffle 6 anos atrás
pai
commit
5a76e5f542
5 arquivos alterados com 28 adições e 2 exclusões
  1. +4
    -0
      helpers/passives/client/js/generator.js
  2. +17
    -0
      helpers/passives/client/ui/templates/groups/groups.js
  3. +1
    -1
      helpers/passives/client/ui/templates/groups/styles.css
  4. +5
    -0
      helpers/passives/client/ui/templates/groups/styles.less
  5. +1
    -1
      helpers/passives/client/ui/templates/nodeInfo/nodeInfo.js

+ 4
- 0
helpers/passives/client/js/generator.js Ver arquivo

@@ -72,6 +72,8 @@ define([
reset: function () {
this.nodes = [];
this.links = [];

events.emit('onNew');
},

load: function (data) {
@@ -199,6 +201,8 @@ define([
this.links.spliceWhere(n => ((n.from == selected) || (n.to == selected)));

selected.selected = false;

events.emit('onDeleteNode', selected);
},

recolorNode: function () {


+ 17
- 0
helpers/passives/client/ui/templates/groups/groups.js Ver arquivo

@@ -18,6 +18,8 @@ define([

postRender: function () {
this.onEvent('onTreeLoaded', this.events.onTreeLoaded.bind(this));
this.onEvent('onNew', this.events.onNew.bind(this));
this.onEvent('onDeleteNode', this.events.onDeleteNode.bind(this));

this.on('.btnAdd', 'click', this.actions.add.bind(this));
this.on('.btnRename', 'click', this.events.onClickRename.bind(this));
@@ -64,6 +66,21 @@ define([
},

events: {
onNew: function () {
this.find('.list').empty();
},

onDeleteNode: function (node) {
if ((!node.group) || (node.group.length == 0))
return;

node.group.forEach(function (g) {
var hasSiblings = generator.nodes.some(n => ((n.group) && (n.group.indexOf(g) > -1)))
if (!hasSiblings)
this.find('.item[group="' + g + '"]').remove();
}, this);
},

onClickRename: function (e) {
this.find('.activeMode').removeClass('activeMode');
this.find('.btnRename').addClass('activeMode');


+ 1
- 1
helpers/passives/client/ui/templates/groups/styles.css Ver arquivo

@@ -1 +1 @@
.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}.uiGroups{position:absolute;left:10px;bottom:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiGroups .heading-text{color:#f2f5f5;margin-bottom:15px}.uiGroups .list:not(:empty){margin-bottom:15px}.uiGroups .list .item{width:100%;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px}.uiGroups .list .item:last-child{margin-bottom:0}.uiGroups .btn{width:calc((100% - 20px) / 2);color:#f2f5f5;background-color:#3fa7dd;padding:5px;box-sizing:border-box;float:left;cursor:pointer}.uiGroups .btn.activeMode{background-color:#51fc9a}.uiGroups .btn:hover{background-color:#51fc9a;color:#3c3f4c}.uiGroups .btn:not(:last-child){margin-right:15px}
.q0{color:#f2f5f5}.q1{color:#3fa7dd}.q2{color:#ffeb38}.q3{color:#a24eff}.q4{color:#ff6942}.color-red{color:#d43346}.color-green{color:#80f643}.uiGroups{position:absolute;left:10px;bottom:10px;padding:10px;width:200px;background-color:#373041;text-align:center}.uiGroups .heading-text{color:#f2f5f5;margin-bottom:15px}.uiGroups .list:not(:empty){margin-bottom:15px}.uiGroups .list .item{width:100%;color:#f2f5f5;background-color:#505360;padding:5px 0 5px 0;margin-bottom:5px;cursor:pointer}.uiGroups .list .item:hover{background-color:#929398}.uiGroups .list .item:last-child{margin-bottom:0}.uiGroups .btn{width:calc((100% - 20px) / 2);color:#f2f5f5;background-color:#3fa7dd;padding:5px;box-sizing:border-box;float:left;cursor:pointer}.uiGroups .btn.activeMode{background-color:#51fc9a}.uiGroups .btn:hover{background-color:#51fc9a;color:#3c3f4c}.uiGroups .btn:not(:last-child){margin-right:15px}

+ 5
- 0
helpers/passives/client/ui/templates/groups/styles.less Ver arquivo

@@ -25,6 +25,11 @@
background-color: @blackA;
padding: 5px 0px 5px 0px;
margin-bottom: 5px;
cursor: pointer;

&:hover {
background-color: @grayC;
}

&:last-child {
margin-bottom: 0px;


+ 1
- 1
helpers/passives/client/ui/templates/nodeInfo/nodeInfo.js Ver arquivo

@@ -136,8 +136,8 @@ define([

this.find('.lookup').hide();

this.buildStatSelector();
this.updateNode();
this.setStats();
},

onShowLookup: function (e) {


Carregando…
Cancelar
Salvar