mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-29 09:04:55 +01:00
Squashed commit of the following:
commit 81e9041e19344df18d8e91a31edb69ea0bce6bf7 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sun Dec 5 14:35:11 2021 -0800 Fix serialization bug commit 290223f15aa3902ef3291e0f392a92d04e9ccd0e Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sun Dec 5 09:36:59 2021 -0800 Fix serialization bug commit 3c1a2e37cf7be34780b760eb6f2fd3e3ac577ed1 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sun Dec 5 09:24:13 2021 -0800 Fix missing references commit 98a7fd3e1659eb32cee43144da4a10b98cfcfed0 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sun Dec 5 09:08:38 2021 -0800 Fix compile commit 9f5146b353f0fdb34a5b83db6d120bc09a96a073 Merge: 218e074 d3dc44c Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sun Dec 5 09:03:17 2021 -0800 Merge branch 'develop' into feature/mindplot_tests_playground commit 218e074b7330d0a02ac7afee0b644737f3bb6b03 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 17:46:22 2021 -0800 Add jquery missing dependency commit c01a748a84a2359dcf1a49d9593369c9fefe1e76 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 17:41:47 2021 -0800 Remove undercore commit d680b063b819563f4fae38571055aad4c55180b7 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 17:36:58 2021 -0800 Add missing dependencies commit be9aa21245e84c97fa9fe3545299c6bb01772ef1 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 17:25:23 2021 -0800 Fix missign dependencies. commit 2472fa453c43b64286552edb7120d4d2c395eba4 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 17:08:48 2021 -0800 Fix compilation commit a013d07dc15a3bddda1e42cad373abbdfc525c74 Merge: f2ac8fe a81e984 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Sat Dec 4 16:57:19 2021 -0800 Merge branch 'develop' into feature/mindplot_tests_playground commit f2ac8fe17de071a09f80a20f49eb42c66b5f2f2b Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Thu Dec 2 18:59:03 2021 -0800 Hack: Add declaration of designer as global variable. commit 432167acbb055fba19f1e8469db4ffe8ad7793b7 Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Thu Dec 2 18:51:13 2021 -0800 Hack the initialization of extended hotkey pluggin. commit 794db35e88f6bd232094b4f104c8fe6a8fab34be Author: Paulo Gustavo Veiga <pveiga@wisemapping.com> Date: Thu Dec 2 17:57:21 2021 -0800 Add keyboard function commit e47a48d51f1af0ebde4ebea07cb467a8e5a7a372 Author: Matias Arriola <matias.arriola@gmail.com> Date: Thu Dec 2 14:50:43 2021 -0300 Fix editor snapshot commit 9bf8baef1216352ed1f9dde4658c479c0044b093 Author: Matias Arriola <matias.arriola@gmail.com> Date: Thu Dec 2 13:14:13 2021 -0300 Add editor test to mindplot playground Add missing imports and fix BootstrapDialog references commit b2dcc3034fc638f58cdb59e96ab7d6e2435f634a Author: Matias Arriola <matias.arriola@gmail.com> Date: Thu Dec 2 11:56:10 2021 -0300 Add embedded test to mindplot playground commit 08b514e1aa7b51c4df56b2b3cb7f28c191adeae7 Author: Matias Arriola <matias.arriola@gmail.com> Date: Thu Dec 2 10:27:31 2021 -0300 Fix mindplot layout test Upgrade raphael to avoid error Load raphael from context-loader
This commit is contained in:
parent
830fbdaebc
commit
6ba917cf32
@ -798,7 +798,7 @@ class Designer extends Events {
|
||||
const targetTopic = dmodel.findTopicById(targetTopicId);
|
||||
$assert(
|
||||
targetTopic,
|
||||
`targetTopic could not be found:${targetTopicId}${dmodel
|
||||
`targetTopic could not be found:${targetTopicId},${dmodel
|
||||
.getTopics()
|
||||
.map((e) => e.getId())}`,
|
||||
);
|
||||
|
@ -53,7 +53,7 @@ XMLSerializerFactory.getSerializerFromDocument = function (domDocument) {
|
||||
* @param {String} version the version name
|
||||
* @return serializer
|
||||
*/
|
||||
XMLSerializerFactory.getSerializer = function (version) {
|
||||
XMLSerializerFactory.getSerializer = function getSerializer(version) {
|
||||
if (!$defined(version)) {
|
||||
version = ModelCodeName.BETA;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class XMLSerializer_Beta {
|
||||
const parent = topic.getParent();
|
||||
if (parent == null || parent.getType() === INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
const pos = topic.getPosition();
|
||||
parentTopic.setAttribute('position', `${pos.x}${pos.y}`);
|
||||
parentTopic.setAttribute('position', `${pos.x},${pos.y}`);
|
||||
} else {
|
||||
const order = topic.getOrder();
|
||||
parentTopic.setAttribute('order', order);
|
||||
|
@ -63,7 +63,7 @@ class XMLSerializer_Pela {
|
||||
&& mindmap.findNodeById(relationship.getToNode()) !== null
|
||||
) {
|
||||
// Isolated relationships are not persisted ....
|
||||
const relationDom = this._relationshipToXML(document, relationship);
|
||||
const relationDom = XMLSerializer_Pela._relationshipToXML(document, relationship);
|
||||
mapElem.appendChild(relationDom);
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ class XMLSerializer_Pela {
|
||||
parentTopic.setAttribute('central', 'true');
|
||||
} else {
|
||||
const pos = topic.getPosition();
|
||||
parentTopic.setAttribute('position', `${pos.x}${pos.y}`);
|
||||
parentTopic.setAttribute('position', `${pos.x},${pos.y}`);
|
||||
|
||||
const order = topic.getOrder();
|
||||
if (typeof order === 'number' && Number.isFinite(order)) { parentTopic.setAttribute('order', order); }
|
||||
@ -98,7 +98,7 @@ class XMLSerializer_Pela {
|
||||
if (shape === TopicShape.IMAGE) {
|
||||
parentTopic.setAttribute(
|
||||
'image',
|
||||
`${topic.getImageSize().width}${topic.getImageSize().height
|
||||
`${topic.getImageSize().width},${topic.getImageSize().height
|
||||
}:${topic.getImageUrl()}`,
|
||||
);
|
||||
}
|
||||
@ -196,7 +196,7 @@ class XMLSerializer_Pela {
|
||||
}
|
||||
}
|
||||
|
||||
_relationshipToXML(document, relationship) {
|
||||
static _relationshipToXML(document, relationship) {
|
||||
const result = document.createElement('relationship');
|
||||
result.setAttribute('srcTopicId', relationship.getFromNode());
|
||||
result.setAttribute('destTopicId', relationship.getToNode());
|
||||
@ -208,14 +208,14 @@ class XMLSerializer_Pela {
|
||||
const srcPoint = relationship.getSrcCtrlPoint();
|
||||
result.setAttribute(
|
||||
'srcCtrlPoint',
|
||||
`${Math.round(srcPoint.x)}${Math.round(srcPoint.y)}`,
|
||||
`${Math.round(srcPoint.x)},${Math.round(srcPoint.y)}`,
|
||||
);
|
||||
}
|
||||
if ($defined(relationship.getDestCtrlPoint())) {
|
||||
const destPoint = relationship.getDestCtrlPoint();
|
||||
result.setAttribute(
|
||||
'destCtrlPoint',
|
||||
`${Math.round(destPoint.x)}${Math.round(destPoint.y)}`,
|
||||
`${Math.round(destPoint.x)},${Math.round(destPoint.y)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -260,7 +260,7 @@ class XMLSerializer_Pela {
|
||||
break;
|
||||
}
|
||||
case 'relationship': {
|
||||
const relationship = this._deserializeRelationship(child, mindmap);
|
||||
const relationship = XMLSerializer_Pela._deserializeRelationship(child, mindmap);
|
||||
if (relationship != null) {
|
||||
mindmap.addRelationship(relationship);
|
||||
}
|
||||
@ -392,7 +392,7 @@ class XMLSerializer_Pela {
|
||||
}
|
||||
|
||||
// Has text node ?.
|
||||
const textAttr = this._deserializeTextAttr(child);
|
||||
const textAttr = XMLSerializer_Pela._deserializeTextAttr(child);
|
||||
if (textAttr) {
|
||||
attributes.text = textAttr;
|
||||
}
|
||||
@ -402,7 +402,7 @@ class XMLSerializer_Pela {
|
||||
const feature = TopicFeature.createModel(featureType, attributes);
|
||||
topic.addFeature(feature);
|
||||
} else if (child.tagName === 'text') {
|
||||
const nodeText = this._deserializeNodeText(child);
|
||||
const nodeText = XMLSerializer_Pela._deserializeNodeText(child);
|
||||
topic.setText(nodeText);
|
||||
}
|
||||
}
|
||||
@ -410,7 +410,7 @@ class XMLSerializer_Pela {
|
||||
return topic;
|
||||
}
|
||||
|
||||
_deserializeTextAttr(domElem) {
|
||||
static _deserializeTextAttr(domElem) {
|
||||
let value = domElem.getAttribute('text');
|
||||
if (!$defined(value)) {
|
||||
const children = domElem.childNodes;
|
||||
@ -433,7 +433,7 @@ class XMLSerializer_Pela {
|
||||
return value;
|
||||
}
|
||||
|
||||
_deserializeNodeText(domElem) {
|
||||
static _deserializeNodeText(domElem) {
|
||||
const children = domElem.childNodes;
|
||||
let value = null;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
@ -445,7 +445,7 @@ class XMLSerializer_Pela {
|
||||
return value;
|
||||
}
|
||||
|
||||
_deserializeRelationship(domElement, mindmap) {
|
||||
static _deserializeRelationship(domElement, mindmap) {
|
||||
const srcId = domElement.getAttribute('srcTopicId');
|
||||
const destId = domElement.getAttribute('destTopicId');
|
||||
const lineType = domElement.getAttribute('lineType');
|
||||
@ -485,6 +485,7 @@ class XMLSerializer_Pela {
|
||||
* @param in The String whose non-valid characters we want to remove.
|
||||
* @return The in String, stripped of non-valid characters.
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
rmXmlInv(str) {
|
||||
if (str == null || str === undefined) return null;
|
||||
|
||||
|
@ -259,7 +259,7 @@ const TestSuite = new Class({
|
||||
console.log(
|
||||
`\tUpdated nodes: {id:${event.getId()
|
||||
}, order: ${event.getOrder()
|
||||
}${posStr
|
||||
},${posStr
|
||||
}}`,
|
||||
);
|
||||
events.push(event);
|
||||
|
@ -112,12 +112,12 @@ class ElementPeer {
|
||||
setSize(width, height) {
|
||||
if ($defined(width) && this._size.width !== parseInt(width, 10)) {
|
||||
this._size.width = parseInt(width, 10);
|
||||
this._native.setAttribute('width', parseInt(width, 10));
|
||||
this._native.setAttribute('width', this._size.width);
|
||||
}
|
||||
|
||||
if ($defined(height) && this._size.height !== parseInt(height, 10)) {
|
||||
this._size.height = parseInt(height, 10);
|
||||
this._native.setAttribute('height', parseInt(height, 10));
|
||||
this._native.setAttribute('height', this._size.height);
|
||||
}
|
||||
|
||||
EventUtils.broadcastChangeEvent(this, 'strokeStyle');
|
||||
|
Loading…
Reference in New Issue
Block a user