Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
749e4847
Commit
749e4847
authored
Jan 07, 2022
by
Piotr Gawron
Browse files
Merge branch '1602-click-on-pathways-and-compartments' into 'devel_16.0.x'
if pathway is too far don't highlight it See merge request
!1411
parents
3137d440
07881f01
Pipeline
#51129
failed with stage
in 13 minutes and 48 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
749e4847
...
...
@@ -17,6 +17,9 @@ minerva (16.0.6) stable; urgency=medium
"default_compartment"
id
was
crashing
(#
1622
)
*
Bug
fix
:
import
of
SBGN
file
where
TARGET
PORT
of
modification
was
not
defined
crashed
minerva
(#
1620
)
*
Bug
fix
:
clicking
on
'empty'
area
in
the
map
using
"Pathways and
compartments view"
returned
results
for
the
closest
Pathway
/
Compartment
(#
1603
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Thu
,
16
Dec
2021
11
:
00
:
00
+
0200
...
...
frontend-js/src/main/js/map/overlay/SearchDbOverlay.js
View file @
749e4847
...
...
@@ -210,6 +210,7 @@ SearchDbOverlay.prototype.computeMaxDistance = function (model, zoom) {
*/
SearchDbOverlay
.
prototype
.
findCompartmentByCoordinates
=
function
(
coordinates
,
zoom
,
model
,
maxDistance
)
{
var
self
=
this
;
var
result
=
undefined
;
return
ServerConnector
.
getClosestElementsByCoordinates
({
modelId
:
model
.
getId
(),
coordinates
:
coordinates
,
...
...
@@ -228,7 +229,8 @@ SearchDbOverlay.prototype.findCompartmentByCoordinates = function (coordinates,
}
});
}
}).
then
(
function
(
result
)
{
}).
then
(
function
(
compartment
)
{
result
=
compartment
;
if
(
result
!==
undefined
)
{
return
model
.
getAliasById
(
result
.
getId
(),
true
).
then
(
function
(
alias
)
{
//pathways with glyph and z index below 0 should not be clickable
...
...
@@ -239,6 +241,19 @@ SearchDbOverlay.prototype.findCompartmentByCoordinates = function (coordinates,
}
});
}
}).
then
(
function
()
{
if
(
result
!==
undefined
)
{
return
self
.
getMap
().
getDistance
({
modelId
:
result
.
getModelId
(),
coordinates
:
coordinates
,
element
:
result
}).
then
(
function
(
distance
)
{
if
(
distance
<=
maxDistance
)
{
return
result
;
}
});
}
return
result
;
});
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment