Skip to content
Snippets Groups Projects
Commit 8f163c64 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

identified element contains additional data about visualization

parent d14af174
No related branches found
No related tags found
1 merge request!8Resolve "missing methods for JS app API"
......@@ -19,6 +19,7 @@ var logger = require('../../logger');
* </ul>
*/
function IdentifiedElement(javaObject) {
this._visualizationdata = {};
if (javaObject instanceof Alias) {
this.setId(javaObject.getId());
this.setModelId(javaObject.getModelId());
......@@ -152,12 +153,37 @@ IdentifiedElement.prototype.setType = function(type) {
* @returns icon that should be used for visualization
*/
IdentifiedElement.prototype.getIcon = function() {
return this.icon;
return this._visualizationdata._icon;
};
IdentifiedElement.prototype.setIcon = function(icon) {
this.icon = icon;
this._visualizationdata._icon = icon;
};
IdentifiedElement.prototype.getColor = function() {
return this._visualizationdata._color;
};
IdentifiedElement.prototype.setColor = function(color) {
this._visualizationdata._color = color;
};
IdentifiedElement.prototype.getLineWidth = function() {
return this._visualizationdata._lineWidth;
};
IdentifiedElement.prototype.setLineWidth = function(lineWidth) {
this._visualizationdata._lineWidth = lineWidth;
};
IdentifiedElement.prototype.getOnClickHandler = function() {
return this._visualizationdata._onClickHandler;
};
IdentifiedElement.prototype.setOnClickHandler = function(onClickHandler) {
this._visualizationdata._onClickHandler = onClickHandler;
};
IdentifiedElement.prototype.equals = function(argument) {
if (argument instanceof IdentifiedElement) {
return (this.getType() === argument.getType() && //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment