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

Commit a225f68

Browse files
author
Jelte Lagendijk
committed
Fix #32 and minor fixes
1 parent 9446639 commit a225f68

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

dist/TreeView.mpk

-21 Bytes
Binary file not shown.

src/TreeView/widget/Commons.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ define([
259259
throw "Commons.store: Unable to update attribute: " + attr;
260260
}
261261

262-
mx.data[commit === true ? "commit" : "save"]({
262+
mx.data.commit({
263263
mxobj: object,
264264
error: this.error,
265265
callback: function () {
@@ -354,9 +354,6 @@ define([
354354
}
355355

356356
mx.ui.action(mfname, {
357-
store: {
358-
caller: context
359-
},
360357
params: {
361358
applyto: "selection",
362359
guids: guids

src/TreeView/widget/TreeView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ require([
269269
var i = 0;
270270
dojo.forEach(this.types, function (type) {
271271
//more householding
272-
type.isRefset = type.parentassocsingle == "";
272+
type.isRefset = type.parentassocsingle === "" || !type.parentassocsingle;
273273
type.assoc = type.isRefset ? type.parentassocmulti : type.parentassocsingle;
274274

275275
type.index = i++;
@@ -1097,7 +1097,7 @@ require([
10971097
}
10981098
if (!(e in this.dnd.allowDropBefore)) {
10991099
var x = item.graphNode.xsettings;
1100-
this.dnd.allowDropBefore[e] = x && mx.meta.getEntity(e).getAttributeType(x.sortattr) == "Float";
1100+
this.dnd.allowDropBefore[e] = x && mx.meta.getEntity(e).getAttributeType(x.sortattr) == "Decimal";
11011101
}
11021102
return this.dnd.allowDropBefore[e];
11031103
},
@@ -1207,7 +1207,7 @@ require([
12071207

12081208
//2) update position. Note that this position applies to all assocs! which is a bit weird...
12091209
var x = item.graphNode.xsettings;
1210-
if (x && mx.meta.getEntity(item.graphNode.type).getAttributeType(x.sortattr) == "Float") {
1210+
if (x && mx.meta.getEntity(item.graphNode.type).getAttributeType(x.sortattr) == "Decimal") {
12111211
if (pos == "before" || pos == "after") {
12121212
//find the other related element for drop in between
12131213
var othernode = pos == "before" ? target.domNode.previousElementSibling : target.domNode.nextElementSibling;

test/widgets/TreeView.mpk

-21 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)