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
ae3b0f7b
Commit
ae3b0f7b
authored
Jun 17, 2016
by
Joshua Gould
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url support
parent
258dfb17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
37 deletions
+31
-37
src/ui/vector_track.js
src/ui/vector_track.js
+31
-37
No files found.
src/ui/vector_track.js
View file @
ae3b0f7b
...
@@ -791,6 +791,7 @@ morpheus.VectorTrack.prototype = {
...
@@ -791,6 +791,7 @@ morpheus.VectorTrack.prototype = {
if
(
!
this
.
settings
.
squished
if
(
!
this
.
settings
.
squished
&&
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT_AND_COLOR
))
{
&&
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT_AND_COLOR
))
{
context
.
fillStyle
=
morpheus
.
CanvasUtil
.
FONT_COLOR
;
this
.
renderText
(
context
,
vector
,
true
,
start
,
end
,
clip
,
offset
,
this
.
renderText
(
context
,
vector
,
true
,
start
,
end
,
clip
,
offset
,
this
.
isColumns
?
fullAvailableSpace
:
0
);
this
.
isColumns
?
fullAvailableSpace
:
0
);
offset
+=
this
.
settings
.
maxTextWidth
+
2
;
offset
+=
this
.
settings
.
maxTextWidth
+
2
;
...
@@ -800,6 +801,12 @@ morpheus.VectorTrack.prototype = {
...
@@ -800,6 +801,12 @@ morpheus.VectorTrack.prototype = {
if
(
!
this
.
settings
.
squished
if
(
!
this
.
settings
.
squished
&&
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT
))
{
&&
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT
))
{
this
.
textWidth
=
availableSpace
;
this
.
textWidth
=
availableSpace
;
context
.
fillStyle
=
morpheus
.
CanvasUtil
.
FONT_COLOR
;
var
dataType
=
morpheus
.
VectorUtil
.
getDataType
(
vector
);
if
(
dataType
===
'
url
'
)
{
context
.
fillStyle
=
'
blue
'
;
this
.
canvas
.
style
.
cursor
=
'
pointer
'
;
}
this
.
renderText
(
context
,
vector
,
false
,
start
,
end
,
clip
,
offset
,
this
.
renderText
(
context
,
vector
,
false
,
start
,
end
,
clip
,
offset
,
this
.
isColumns
?
fullAvailableSpace
:
0
);
this
.
isColumns
?
fullAvailableSpace
:
0
);
offset
+=
this
.
settings
.
textWidth
+
2
;
offset
+=
this
.
settings
.
textWidth
+
2
;
...
@@ -864,25 +871,7 @@ morpheus.VectorTrack.prototype = {
...
@@ -864,25 +871,7 @@ morpheus.VectorTrack.prototype = {
// name : SORT_DESC
// name : SORT_DESC
// });
// });
}
}
if
(
!
isColumns
)
{
var
toggle
=
false
;
var
dataset
=
project
.
getSortedFilteredDataset
();
try
{
project
.
getRowSelectionModel
().
getViewIndices
().
forEach
(
function
(
index
)
{
if
(
dataset
.
getState
(
index
)
!==
-
1
)
{
toggle
=
true
;
throw
'
break
'
;
}
});
}
catch
(
x
)
{
// break out of loop
}
if
(
toggle
)
{
sectionToItems
.
Selection
.
push
({
name
:
TOGGLE
});
}
}
var
customItems
=
this
.
heatmap
.
getPopupItems
();
var
customItems
=
this
.
heatmap
.
getPopupItems
();
if
(
customItems
&&
customItems
.
length
>
0
)
{
if
(
customItems
&&
customItems
.
length
>
0
)
{
customItems
.
forEach
(
function
(
item
)
{
customItems
.
forEach
(
function
(
item
)
{
...
@@ -970,20 +959,22 @@ morpheus.VectorTrack.prototype = {
...
@@ -970,20 +959,22 @@ morpheus.VectorTrack.prototype = {
});
});
}
}
sectionToItems
.
Display
.
push
({
if
(
dataType
!==
'
url
'
)
{
name
:
DISPLAY_TEXT
,
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT
)
});
sectionToItems
.
Display
.
push
({
name
:
DISPLAY_COLOR
,
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
COLOR
)
});
if
(
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
COLOR
))
{
sectionToItems
.
Display
.
push
({
sectionToItems
.
Display
.
push
({
name
:
COLOR_BAR_SIZE
name
:
DISPLAY_TEXT
,
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
TEXT
)
});
});
sectionToItems
.
Display
.
push
({
name
:
DISPLAY_COLOR
,
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
COLOR
)
});
if
(
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
COLOR
))
{
sectionToItems
.
Display
.
push
({
name
:
COLOR_BAR_SIZE
});
}
}
}
if
(
!
isArray
)
{
if
(
!
isArray
&&
dataType
!==
'
url
'
)
{
sectionToItems
.
Display
.
push
({
sectionToItems
.
Display
.
push
({
name
:
DISPLAY_SHAPE
,
name
:
DISPLAY_SHAPE
,
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
SHAPE
)
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
SHAPE
)
...
@@ -1002,20 +993,23 @@ morpheus.VectorTrack.prototype = {
...
@@ -1002,20 +993,23 @@ morpheus.VectorTrack.prototype = {
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
MOLECULE
)
checked
:
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
MOLECULE
)
});
});
}
}
sectionToItems
.
Display
.
push
({
sectionToItems
.
Display
.
push
({
name
:
TOOLTIP
,
name
:
TOOLTIP
,
checked
:
this
.
settings
.
inlineTooltip
checked
:
this
.
settings
.
inlineTooltip
});
});
if
(
!
isArray
)
{
if
(
!
isArray
&&
dataType
!==
'
url
'
)
{
sectionToItems
.
Display
.
push
({
sectionToItems
.
Display
.
push
({
name
:
HIGHLIGHT_MATCHING_VALUES
,
name
:
HIGHLIGHT_MATCHING_VALUES
,
checked
:
this
.
settings
.
highlightMatchingValues
checked
:
this
.
settings
.
highlightMatchingValues
});
});
}
}
sectionToItems
.
Display
.
push
({
if
(
dataType
!==
'
url
'
)
{
name
:
'
Squished
'
,
sectionToItems
.
Display
.
push
({
checked
:
this
.
settings
.
squished
name
:
'
Squished
'
,
});
checked
:
this
.
settings
.
squished
});
}
if
(
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
BAR
)
if
(
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
BAR
)
||
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
BOX_PLOT
))
{
||
this
.
isRenderAs
(
morpheus
.
VectorTrack
.
RENDER
.
BOX_PLOT
))
{
sectionToItems
.
Display
.
push
({
sectionToItems
.
Display
.
push
({
...
@@ -2198,7 +2192,7 @@ morpheus.VectorTrack.prototype = {
...
@@ -2198,7 +2192,7 @@ morpheus.VectorTrack.prototype = {
}
}
}
}
}
}
var
position
=
positions
.
getPosition
(
i
);
var
position
=
positions
.
getPosition
(
i
);
var
size
=
positions
.
getItemSize
(
i
);
var
size
=
positions
.
getItemSize
(
i
);
var
positivePairs
=
[];
var
positivePairs
=
[];
...
@@ -2353,7 +2347,7 @@ morpheus.VectorTrack.prototype = {
...
@@ -2353,7 +2347,7 @@ morpheus.VectorTrack.prototype = {
},
},
renderText
:
function
(
context
,
vector
,
isColor
,
start
,
end
,
clip
,
offset
,
renderText
:
function
(
context
,
vector
,
isColor
,
start
,
end
,
clip
,
offset
,
canvasSize
)
{
canvasSize
)
{
context
.
fillStyle
=
morpheus
.
CanvasUtil
.
FONT_COLOR
;
context
.
textBaseline
=
'
middle
'
;
context
.
textBaseline
=
'
middle
'
;
var
positions
=
this
.
positions
;
var
positions
=
this
.
positions
;
var
isColumns
=
this
.
isColumns
;
var
isColumns
=
this
.
isColumns
;
...
...
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