Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
morpheus.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daria Zenkova
morpheus.js
Commits
748ea21d
Commit
748ea21d
authored
May 04, 2016
by
Joshua Gould
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scroll lens multi
parent
f3122169
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
272 additions
and
172 deletions
+272
-172
js/morpheus-latest.min.js
js/morpheus-latest.min.js
+9
-9
src/ui/heat_map.js
src/ui/heat_map.js
+217
-152
src/ui/heat_map_tooltip_provider.js
src/ui/heat_map_tooltip_provider.js
+17
-3
src/ui/scented_search.js
src/ui/scented_search.js
+29
-8
No files found.
js/morpheus-latest.min.js
View file @
748ea21d
This diff is collapsed.
Click to expand it.
src/ui/heat_map.js
View file @
748ea21d
This diff is collapsed.
Click to expand it.
src/ui/heat_map_tooltip_provider.js
View file @
748ea21d
morpheus
.
HeatMapTooltipProvider
=
function
(
heatMap
,
rowIndex
,
columnIndex
,
options
,
separator
,
quick
)
{
options
,
separator
,
quick
,
tipText
)
{
var
dataset
=
heatMap
.
project
.
getSortedFilteredDataset
();
var
tipText
=
[];
if
(
!
quick
)
{
if
(
options
.
value
)
{
// key value pairs for custom tooltip
_
.
each
(
options
.
value
,
function
(
pair
)
{
...
...
@@ -50,6 +49,21 @@ morpheus.HeatMapTooltipProvider = function (heatMap, rowIndex, columnIndex,
separator
);
}
}
else
if
(
quick
)
{
if
(
rowIndex
!==
-
1
)
{
morpheus
.
HeatMapTooltipProvider
.
_tracksToString
(
options
,
heatMap
.
rowTracks
.
filter
(
function
(
t
)
{
return
t
.
settings
.
inlineTooltip
;
}),
dataset
.
getRowMetadata
(),
rowIndex
,
tipText
,
separator
);
}
if
(
columnIndex
!==
-
1
)
{
morpheus
.
HeatMapTooltipProvider
.
_tracksToString
(
options
,
heatMap
.
columnTracks
.
filter
(
function
(
t
)
{
return
t
.
settings
.
inlineTooltip
;
}),
dataset
.
getColumnMetadata
(),
columnIndex
,
tipText
,
separator
);
}
}
if
(
!
quick
)
{
...
...
@@ -131,7 +145,7 @@ morpheus.HeatMapTooltipProvider = function (heatMap, rowIndex, columnIndex,
heatMap
.
columnDendrogram
.
_selectedNodeColor
,
separator
);
}
}
return
tipText
.
join
(
''
);
};
morpheus
.
HeatMapTooltipProvider
.
_matrixValueToString
=
function
(
dataset
,
...
...
src/ui/scented_search.js
View file @
748ea21d
...
...
@@ -13,20 +13,20 @@ morpheus.ScentedSearch = function (model, positions, isVertical, scrollbar,
scrollbar
.
decorator
=
this
;
var
_this
=
this
;
var
mouseMove
=
function
(
e
)
{
var
ind
ex
=
_this
.
getIndex
(
e
);
_this
.
mouseMovedIndex
=
index
;
document
.
body
.
style
.
cursor
=
ind
ex
<
0
?
'
default
'
:
'
pointer
'
;
scrollbar
.
canvas
.
style
.
cursor
=
ind
ex
<
0
?
'
default
'
:
'
pointer
'
;
var
ind
ices
=
_this
.
getSearchIndices
(
e
);
document
.
body
.
style
.
cursor
=
ind
ices
.
length
===
0
?
'
default
'
:
'
pointer
'
;
scrollbar
.
canvas
.
style
.
cursor
=
ind
ices
.
length
===
0
?
'
default
'
:
'
pointer
'
;
var
tipOptions
=
{
event
:
e
,
heatMapLens
:
ind
ex
>=
0
heatMapLens
:
ind
ices
.
length
>=
0
};
if
(
isVertical
)
{
controller
.
setToolTip
(
ind
ex
>=
0
?
_this
.
searchIndices
[
index
]
:
-
1
,
controller
.
setToolTip
(
ind
ices
.
length
>=
0
?
indices
:
null
,
-
1
,
tipOptions
);
}
else
{
controller
.
setToolTip
(
-
1
,
ind
ex
>=
0
?
_this
.
searchIndices
[
index
]
:
-
1
,
tipOptions
);
controller
.
setToolTip
(
-
1
,
ind
ices
.
length
>=
0
?
indices
:
null
,
tipOptions
);
}
};
...
...
@@ -48,6 +48,27 @@ morpheus.ScentedSearch.prototype = {
var
val
=
pix
[
this
.
isVertical
?
'
y
'
:
'
x
'
];
return
this
.
getIndexForPix
(
val
);
},
getSearchIndices
:
function
(
event
)
{
var
pix
=
morpheus
.
CanvasUtil
.
getMousePos
(
event
.
target
,
event
);
var
val
=
pix
[
this
.
isVertical
?
'
y
'
:
'
x
'
];
return
this
.
getSearchIndicesForPix
(
val
);
},
getSearchIndicesForPix
:
function
(
pix
)
{
var
indices
=
this
.
searchIndices
;
if
(
indices
==
null
)
{
return
[];
}
var
scale
=
this
.
scale
;
var
tolerance
=
morpheus
.
ScentedSearch
.
LINE_HEIGHT
;
var
matches
=
[];
for
(
var
i
=
0
,
length
=
indices
.
length
;
i
<
length
;
i
++
)
{
var
midVal
=
this
.
positions
.
getPosition
(
indices
[
i
])
*
scale
;
if
(
Math
.
abs
(
midVal
-
pix
)
<=
tolerance
)
{
matches
.
push
(
indices
[
i
]);
}
}
return
matches
;
},
getIndexForPix
:
function
(
pix
)
{
var
indices
=
this
.
searchIndices
;
if
(
indices
==
null
)
{
...
...
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