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
Devrim Gunyel
core
Commits
b4ce4d37
Commit
b4ce4d37
authored
Jun 05, 2019
by
Piotr Gawron
Browse files
invisible layer is not drawn
parent
9e20511f
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
b4ce4d37
...
...
@@ -3,6 +3,7 @@ minerva (12.3.1~beta.1) unstable; urgency=low
name
was
used
*
Bug
fix
:
plugin
tab
header
wasn
't properly resized after adding plugins
that introduced second line for tab selection (#758)
* Bug fix: invisible layer shouldn'
t
be
shown
in
the
on
th
map
(#
813
)
minerva
(
13.1.0
~
beta
.0
)
unstable
;
urgency
=
low
*
Feature
:
annotators
are
more
flexible
-
you
can
define
set
of
input
and
...
...
converter-graphics/src/main/java/lcsb/mapviewer/converter/graphics/AbstractImageGenerator.java
View file @
b4ce4d37
...
...
@@ -711,7 +711,9 @@ public abstract class AbstractImageGenerator {
List
<
Drawable
>
bioEntities
=
new
ArrayList
<>();
bioEntities
.
addAll
(
params
.
getModel
().
getBioEntities
());
for
(
Layer
layer
:
params
.
getModel
().
getLayers
())
{
bioEntities
.
addAll
(
layer
.
getDrawables
());
if
(
layer
.
isVisible
())
{
bioEntities
.
addAll
(
layer
.
getDrawables
());
}
}
bioEntities
.
sort
(
BioEntity
.
Z_INDEX_COMPARATOR
);
...
...
converter-graphics/src/test/java/lcsb/mapviewer/converter/graphics/AbstractImageGeneratorTest.java
View file @
b4ce4d37
...
...
@@ -13,6 +13,8 @@ import org.junit.Before;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
lcsb.mapviewer.model.map.layout.graphics.Layer
;
import
lcsb.mapviewer.model.map.layout.graphics.LayerRect
;
import
lcsb.mapviewer.model.map.model.Model
;
import
lcsb.mapviewer.model.map.model.ModelFullIndexed
;
import
lcsb.mapviewer.model.map.reaction.Reaction
;
...
...
@@ -68,6 +70,33 @@ public class AbstractImageGeneratorTest extends GraphicsTestFunctions {
}
}
@Test
public
void
testDrawMapWithInvisibleLayerNesting
()
throws
Exception
{
try
{
Graphics2D
graphics
=
createGraphicsMock
();
Model
model
=
createEmptyModel
();
Layer
layer
=
new
Layer
();
layer
.
setVisible
(
false
);
LayerRect
rect
=
new
LayerRect
();
rect
.
setX
(
10.0
);
rect
.
setX
(
10.0
);
rect
.
setWidth
(
20
.);
rect
.
setHeight
(
20
.);
layer
.
addLayerRect
(
rect
);
model
.
addLayer
(
layer
);
AbstractImageGenerator
gen
=
createAbstractImageGeneratorMock
(
graphics
,
model
);
gen
.
setParams
(
new
AbstractImageGenerator
.
Params
().
model
(
model
).
nested
(
true
));
gen
.
draw
();
// 3 times for proteins and 4 times for reaction
verify
(
graphics
,
times
(
0
)).
draw
(
any
());
}
catch
(
Exception
e
)
{
throw
e
;
}
}
@Test
public
void
testDrawSimpleMapWithWhenNestingHidesElement
()
throws
Exception
{
try
{
...
...
@@ -88,9 +117,7 @@ public class AbstractImageGeneratorTest extends GraphicsTestFunctions {
}
private
Model
createSimpleModel
()
{
Model
model
=
new
ModelFullIndexed
(
null
);
model
.
setWidth
(
100
);
model
.
setHeight
(
100
);
Model
model
=
createEmptyModel
();
GenericProtein
protein1
=
createProtein
();
model
.
addElement
(
protein1
);
...
...
@@ -110,6 +137,13 @@ public class AbstractImageGeneratorTest extends GraphicsTestFunctions {
return
model
;
}
private
Model
createEmptyModel
()
{
Model
model
=
new
ModelFullIndexed
(
null
);
model
.
setWidth
(
100
);
model
.
setHeight
(
100
);
return
model
;
}
private
AbstractImageGenerator
createAbstractImageGeneratorMock
(
Graphics2D
graphics
,
Model
model
)
throws
Exception
{
AbstractImageGenerator
result
=
Mockito
.
mock
(
AbstractImageGenerator
.
class
,
Mockito
.
CALLS_REAL_METHODS
);
result
.
setGraphics
(
graphics
);
...
...
frontend-js/package-lock.json
View file @
b4ce4d37
...
...
@@ -87,6 +87,7 @@
"version"
:
"0.1.4"
,
"resolved"
:
"https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz"
,
"integrity"
:
"sha1-DNkKVhCT810KmSVsIrcGlDP60Rc="
,
"optional"
:
true
,
"requires"
:
{
"kind-of"
:
"^3.0.2"
,
"longest"
:
"^1.0.1"
,
...
...
@@ -3309,7 +3310,8 @@
"longest"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/longest/-/longest-1.0.1.tgz"
,
"integrity"
:
"sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
"integrity"
:
"sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
,
"optional"
:
true
},
"loose-envify"
:
{
"version"
:
"1.3.1"
,
...
...
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