mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
- Remove CENTRAL_NODE flag.
This commit is contained in:
parent
a0ee153ca0
commit
7bbcd82488
@ -64,7 +64,7 @@ mindplot.MainTopic = new Class({
|
||||
// Change figure based on the connected topic ...
|
||||
var model = this.getModel();
|
||||
var shapeType = model.getShapeType();
|
||||
if (targetTopic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (!targetTopic.isCentralTopic()) {
|
||||
if (!$defined(shapeType)) {
|
||||
// Get the real shape type ...
|
||||
shapeType = this.getShapeType();
|
||||
@ -168,7 +168,7 @@ mindplot.MainTopic = new Class({
|
||||
_getInnerPadding:function () {
|
||||
var result;
|
||||
var parent = this.getModel().getParent();
|
||||
if (parent && mindplot.model.INodeModel.MAIN_TOPIC_TYPE == parent.getType()) {
|
||||
if (parent && !parent.isCentralTopic()) {
|
||||
result = 3;
|
||||
}
|
||||
else {
|
||||
@ -181,7 +181,7 @@ mindplot.MainTopic = new Class({
|
||||
var targetTopic = this.getOutgoingConnectedTopic();
|
||||
var result = "";
|
||||
if ($defined(targetTopic)) {
|
||||
if (targetTopic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (targetTopic.isCentralTopic()) {
|
||||
result = $msg('MAIN_TOPIC');
|
||||
} else {
|
||||
result = $msg('SUB_TOPIC');
|
||||
@ -196,7 +196,7 @@ mindplot.MainTopic = new Class({
|
||||
var targetTopic = this.getOutgoingConnectedTopic();
|
||||
var result;
|
||||
if ($defined(targetTopic)) {
|
||||
if (targetTopic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (targetTopic.isCentralTopic()) {
|
||||
result = {
|
||||
font:"Arial",
|
||||
size:8,
|
||||
|
@ -29,7 +29,7 @@ mindplot.Topic = new Class({
|
||||
|
||||
// Position a topic ....
|
||||
var pos = model.getPosition();
|
||||
if (pos != null && model.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (pos != null && this.isCentralTopic()) {
|
||||
this.setPosition(pos);
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ mindplot.Topic = new Class({
|
||||
this._setBorderColor(brColor, false);
|
||||
|
||||
// Define the pointer ...
|
||||
if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE && !this.isReadOnly()) {
|
||||
if (!this.isCentralTopic() && !this.isReadOnly()) {
|
||||
this._innerShape.setCursor('move');
|
||||
} else {
|
||||
this._innerShape.setCursor('default');
|
||||
@ -340,7 +340,7 @@ mindplot.Topic = new Class({
|
||||
|
||||
if (!readOnly) {
|
||||
// Propagate mouse events ...
|
||||
if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (!this.isCentralTopic()) {
|
||||
result.setCursor('move');
|
||||
} else {
|
||||
result.setCursor('default');
|
||||
@ -829,7 +829,7 @@ mindplot.Topic = new Class({
|
||||
setBranchVisibility:function (value) {
|
||||
var current = this;
|
||||
var parent = this;
|
||||
while (parent != null && parent.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
while (parent != null && !parent.isCentralTopic()) {
|
||||
current = parent;
|
||||
parent = current.getParent();
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ mindplot.Topic = new Class({
|
||||
var elem = this.get2DElement();
|
||||
workspace.appendChild(elem);
|
||||
if (!this.isInWorkspace()) {
|
||||
if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
if (!this.isCentralTopic()) {
|
||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeAdded, this.getModel());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user