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

Merge branch '545-linewidth-is-ignored' into 'devel_12.1.x'

Resolve "lineWidth is ignored"

See merge request !475
parents e241c61f e4997e69
No related branches found
No related tags found
5 merge requests!488Merge 12.1.1 into master,!48712.1.1 into master,!484v12.1.1 release,!479Resolve "Pathways and compartments overlay is unavailable if using Custom Semantic Zoom",!475Resolve "lineWidth is ignored"
Pipeline #7177 passed
......@@ -83,7 +83,7 @@ OpenLayerPolyline.prototype.isShown = function () {
OpenLayerPolyline.prototype.getBounds = function () {
var self = this;
var extent = self.getOpenLayersRectangle().getGeometry().getExtent();
var extent = self.getOpenLayersPolyline().getGeometry().getExtent();
var projection1 = [extent[0], extent[1]];
var p1 = self.getMap().fromProjectionToPoint(projection1);
......
......@@ -87,7 +87,7 @@ ReactionSurface.prototype.setColor = function (color) {
strokeColor: color
});
}
this.customized = true;
this.setCustomized(true);
};
/**
......@@ -163,7 +163,7 @@ ReactionSurface.prototype.changedToDefault = function () {
strokeWeight: 5
});
}
this.customized = false;
this.setCustomized(false);
};
/**
......@@ -177,7 +177,7 @@ ReactionSurface.prototype.changedToCustomized = function () {
strokeWeight: this.getWidth()
});
}
this.customized = true;
this.setCustomized(true);
};
/**
......
"use strict";
require("../../../mocha-config");
// noinspection JSUnusedLocalSymbols
var logger = require('../../../logger');
var OpenLayerCanvas = require('../../../../../main/js/map/canvas/OpenLayers/OpenLayerCanvas');
var OpenLayerPolyline = require('../../../../../main/js/map/canvas/OpenLayers/OpenLayerPolyline');
var Bounds = require('../../../../../main/js/map/canvas/Bounds');
var Point = require('../../../../../main/js/map/canvas/Point');
var SelectionContextMenu = require('../../../../../main/js/gui/SelectionContextMenu');
var chai = require('chai');
var assert = chai.assert;
describe('OpenLayerPolyline', function () {
var testOptions = {
center: new Point(0, 0),
tileSize: 256,
width: 300,
height: 600,
zoom: 3,
minZoom: 2,
maxZoom: 10,
backgroundOverlays: [{
id: 1,
name: "overlay",
directory: "overlay_dir"
}]
};
it("getBounds", function () {
var canvas = new OpenLayerCanvas(testDiv, testOptions);
var path = [new Point(0, 0), new Point(10, 5)];
var polyline = canvas.createPolyline({
strokeWeight: 1,
strokeColor: "#00ff00",
path: path
});
polyline.show();
assert.ok(polyline.getBounds());
});
});
......@@ -143,7 +143,7 @@ public class OverlayRestImpl extends BaseRestImpl {
if (columns != null && !columns.trim().isEmpty()) {
columnSet = columns.split(",");
} else {
columnSet = new String[] { "modelId", "idObject", "value", "color", "uniqueId" };
columnSet = new String[] { "modelId", "idObject", "value", "color", "uniqueId", "width" };
}
List<Map<String, Object>> result = new ArrayList<>();
......@@ -426,6 +426,12 @@ public class OverlayRestImpl extends BaseRestImpl {
}
} else if (column.equals("description")) {
value = colorSchema.getDescription();
} else if (column.equals("width")) {
if (bioEntity instanceof Reaction) {
value = colorSchema.getLineWidth();
} else {
continue;
}
} else if (column.equals("type")) {
if (colorSchema instanceof GeneVariationColorSchema) {
value = ColorSchemaType.GENETIC_VARIANT;
......
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