Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix #32 and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelte Lagendijk committed Apr 14, 2017
1 parent 9446639 commit a225f68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Binary file modified dist/TreeView.mpk
Binary file not shown.
5 changes: 1 addition & 4 deletions src/TreeView/widget/Commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ define([
throw "Commons.store: Unable to update attribute: " + attr;
}

mx.data[commit === true ? "commit" : "save"]({
mx.data.commit({
mxobj: object,
error: this.error,
callback: function () {
Expand Down Expand Up @@ -354,9 +354,6 @@ define([
}

mx.ui.action(mfname, {
store: {
caller: context
},
params: {
applyto: "selection",
guids: guids
Expand Down
6 changes: 3 additions & 3 deletions src/TreeView/widget/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ require([
var i = 0;
dojo.forEach(this.types, function (type) {
//more householding
type.isRefset = type.parentassocsingle == "";
type.isRefset = type.parentassocsingle === "" || !type.parentassocsingle;
type.assoc = type.isRefset ? type.parentassocmulti : type.parentassocsingle;

type.index = i++;
Expand Down Expand Up @@ -1097,7 +1097,7 @@ require([
}
if (!(e in this.dnd.allowDropBefore)) {
var x = item.graphNode.xsettings;
this.dnd.allowDropBefore[e] = x && mx.meta.getEntity(e).getAttributeType(x.sortattr) == "Float";
this.dnd.allowDropBefore[e] = x && mx.meta.getEntity(e).getAttributeType(x.sortattr) == "Decimal";
}
return this.dnd.allowDropBefore[e];
},
Expand Down Expand Up @@ -1207,7 +1207,7 @@ require([

//2) update position. Note that this position applies to all assocs! which is a bit weird...
var x = item.graphNode.xsettings;
if (x && mx.meta.getEntity(item.graphNode.type).getAttributeType(x.sortattr) == "Float") {
if (x && mx.meta.getEntity(item.graphNode.type).getAttributeType(x.sortattr) == "Decimal") {
if (pos == "before" || pos == "after") {
//find the other related element for drop in between
var othernode = pos == "before" ? target.domNode.previousElementSibling : target.domNode.nextElementSibling;
Expand Down
Binary file modified test/widgets/TreeView.mpk
Binary file not shown.

0 comments on commit a225f68

Please sign in to comment.