Skip to content
Snippets Groups Projects

Master

Merged Peter Zhai requested to merge master into release
1 file
+ 18
18
Compare changes
  • Side-by-side
  • Inline
+ 18
18
@@ -14,7 +14,7 @@
});
}
// 'this' refers to cqhm.modelTypes in the current context
@@ -193,7 +193,7 @@
customType.prototype.set = customSetAttr;
customType.prototype._get = customType.prototype.get;
customType.prototype.get = customGetAttr;
var type = customType.prototype.defaults.type;
if (_.contains(["cqhm.Stock", "cqhm.Cloud", "cqhm.FinalState", "cqhm.Branch", "cqhm.StatechartEntryPoint", "cqhm.State", "cqhm.Parameter", "cqhm.Event",
"cqhm.DynamicEvent", "cqhm.Agent"], type)) {
@@ -235,7 +235,7 @@
customView.prototype._pointerdown = customView.prototype.pointerdown;
customView.prototype.pointerdown = function(evt, x, y) {
if (this.paper != cqhm.modelDisplay._paper) {
// The clicked element is not on the model paper (probably in
// The clicked element is not on the model paper (probably in
// the pallette), so proceed to normal handler
this._pointerdown(evt, x, y);
return;
@@ -259,13 +259,13 @@
customView.prototype._pointermove = customView.prototype.pointermove;
customView.prototype.pointermove = function(evt, x, y) {
if (this.paper != cqhm.modelDisplay._paper) {
// The clicked element is not on the model paper (probably in
// The clicked element is not on the model paper (probably in
// the pallette), so proceed to normal handler
this._pointermove(evt, x, y);
return;
}
if (!cqhm.modelSelection.isSelected(this)) {
return; // Not currently selected
return; // Not currently selected
}
// TODO: Add any custom pointermove logic
var dx = x - this._dx;
@@ -274,7 +274,7 @@
cqhm.modelSelection.applyCallbackToSelection(function(view) {
view.model.shift(dx, dy);
}, [this]);
});
// Because the jointjs highlighter is broken for links (it does not update
// like other do), manually rehighight things to update it
cqhm.modelSelection.updateSelectionHighlighters();
@@ -282,13 +282,13 @@
customView.prototype._pointerup = customView.prototype.pointerup;
customView.prototype.pointerup = function(evt, x, y) {
if (this.paper != cqhm.modelDisplay._paper) {
// The clicked element is not on the model paper (probably in
// The clicked element is not on the model paper (probably in
// the pallette), so proceed to normal handler
this._pointerup(evt, x, y);
return;
}
if (!cqhm.modelSelection.isSelected(this)) {
return; // Not currently selected
return; // Not currently selected
}
// TODO: Add any custom pointerup logic
this._pointerup(evt, x, y);
@@ -296,7 +296,7 @@
customView.prototype._pointerclick = customView.prototype.pointerclick;
customView.prototype.pointerclick = function(evt, x, y) {
if (this.paper != cqhm.modelDisplay._paper) {
// The clicked element is not on the model paper (probably in
// The clicked element is not on the model paper (probably in
// the pallette), so proceed to normal handler
this._pointerclick(evt, x, y);
return;
@@ -306,9 +306,9 @@
if (evt.shiftKey) {
cqhm.modelSelection.addToSelection(this);
} else {
cqhm.modelSelection.select(this);
}
return; // Not currently selected
cqhm.modelSelection.select(this);
}
return; // Not currently selected
}
// TODO: Add any custom pointerclick logic
this._pointerclick(evt, x, y);
@@ -316,13 +316,13 @@
customView.prototype._pointerdblclick = customView.prototype.pointerdblclick;
customView.prototype.pointerdblclick = function(evt, x, y) {
if (this.paper != cqhm.modelDisplay._paper) {
// The clicked element is not on the model paper (probably in
// The clicked element is not on the model paper (probably in
// the pallette), so proceed to normal handler
this._pointerdblclick(evt, x, y);
return;
}
if (!cqhm.modelSelection.isSelected(this)) {
return; // Not currently selected
return; // Not currently selected
} else {
// This one is currently selected
if (this instanceof joint.dia.LinkView) {
@@ -369,7 +369,7 @@
path: {
stroke: "#000",
fill: "#b8cef2",
d: ("M 6,0" + // move to start position (6,0)
d: ("M 6,0" + // move to start position (6,0)
"a 6,4 0 0 0 -6,4" + // draw top left corner (arch)
"v 32" + // draw left edge
"a 6,4 0 0 0 6,4" + // draw bottom left corner (arch)
@@ -607,7 +607,7 @@
d: ""
},
".marker-target": { fill: "black", stroke: "black", "stroke-width": "2px",
d: ("M 0,0" +
d: ("M 0,0" +
"l 16,6" +
"v -12" +
"l -16,6")
@@ -1357,7 +1357,7 @@
// JointJS only finds custom Views if they are in a joint.some.words scope
// Custom cells can be created any where and used, but the accociated
// Custom cells can be created any where and used, but the accociated
// custom view will ONLY be found if it has the same name and scope. Ex:
// joint.words.here = {
// myCell: someCellConstructer,
@@ -1367,4 +1367,4 @@
// are still accessible through cqhm.modelTypes, but JointJS can find them
joint.shapes.cqhm = this;
};
})();
\ No newline at end of file
})();
Loading