Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
07c3c70e
Commit
07c3c70e
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
Fix for bump spacing which relied on correct returns from item_get_bounds.
Well now it'll return the correct numbers!
parent
ab16c6f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapWindow/zmapWindowColBump.c
+40
-5
40 additions, 5 deletions
src/zmapWindow/zmapWindowColBump.c
with
40 additions
and
5 deletions
src/zmapWindow/zmapWindowColBump.c
+
40
−
5
View file @
07c3c70e
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See zmapWindow_P.h
* HISTORY:
* Last edited: May
7 22:33
2009 (rds)
* Last edited: May
12 10:08
2009 (rds)
* Created: Tue Sep 4 10:52:09 2007 (edgrif)
* CVS info: $Id: zmapWindowColBump.c,v 1.4
1
2009-05-
08 15:08:18
rds Exp $
* CVS info: $Id: zmapWindowColBump.c,v 1.4
2
2009-05-
12 09:09:35
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -455,7 +455,7 @@ void zmapWindowColumnBumpRange(FooCanvasItem *column_item, ZMapStyleBumpMode bum
width
=
zmapWindowItemFeatureSetGetWidth
(
set_data
);
bump_spacing
=
zmapWindowItemFeatureGetBumpSpacing
(
set_data
)
;
bump_data
.
incr
=
width
+
bump_spacing
;
bump_data
.
incr
=
width
+
bump_spacing
+
1
;
/* adding one because it makes the spacing work... */
bump_data
.
bump_prop_data
=
bump_properties
;
/* struct copy! */
...
...
@@ -721,7 +721,31 @@ void zmapWindowColumnBumpAllInitial(FooCanvasItem *column_item)
/*
* Internal routines.
*/
#warning this_needs_to_go
static
void
invoke_realize_and_map
(
FooCanvasItem
*
item
)
{
if
(
FOO_IS_CANVAS_GROUP
(
item
))
{
g_list_foreach
(
FOO_CANVAS_GROUP
(
item
)
->
item_list
,
(
GFunc
)
invoke_realize_and_map
,
NULL
);
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
realize
)
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
realize
(
item
);
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
map
)
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
map
)(
item
);
}
else
{
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
realize
)
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
realize
(
item
);
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
map
)
(
FOO_CANVAS_ITEM_GET_CLASS
(
item
)
->
map
)(
item
);
}
return
;
}
/* Is called once for each item in a column and sets the horizontal position of that
* item under various "bumping" modes. */
...
...
@@ -741,7 +765,6 @@ static void bumpColCB(gpointer data, gpointer user_data)
gboolean
ignore_mark
;
gboolean
proceed
=
FALSE
;
proceed
=
zmapWindowItemIsShown
(
item
);
if
(
proceed
)
...
...
@@ -790,6 +813,12 @@ static void bumpColCB(gpointer data, gpointer user_data)
{
/* x1, x2 always needed so might as well get y coords as well because foocanvas will have
* calculated them anyway. */
if
(
!
(
item
->
object
.
flags
&
FOO_CANVAS_ITEM_MAPPED
))
{
/* Unmapped items return empty area bounds! */
invoke_realize_and_map
(
item
);
}
foo_canvas_item_get_bounds
(
item
,
&
x1
,
&
y1
,
&
x2
,
&
y2
)
;
switch
(
bump_mode
)
...
...
@@ -914,7 +943,7 @@ static void bumpColCB(gpointer data, gpointer user_data)
/* Some features are drawn with different widths to indicate things like score. In this case
* their offset needs to be corrected to place them centrally. (We always do this which
* seems inefficient but its a toss up whether it would be quicker to test (dx == 0). */
dx
=
(
zMapStyleGetWidth
(
style
)
-
(
x2
-
x1
))
/
2
;
dx
=
(
zMapStyleGetWidth
(
style
)
-
(
x2
-
x1
-
1
))
/
2
;
offset
+=
dx
;
}
...
...
@@ -2571,6 +2600,12 @@ static void moveItemCB(gpointer data, gpointer user_data)
/* x1, x2 always needed so might as well get y coords as well because foocanvas will have
* calculated them anyway. */
if
(
!
(
item
->
object
.
flags
&
FOO_CANVAS_ITEM_MAPPED
))
{
/* Unmapped items return empty area bounds! */
invoke_realize_and_map
(
item
);
}
foo_canvas_item_get_bounds
(
item
,
&
x1
,
&
y1
,
&
x2
,
&
y2
)
;
zMapStyleGet
(
style
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment