Skip to content
Snippets Groups Projects
Commit 2584422b authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

mouse over on operon struct

parent 1f91e4cf
No related branches found
No related tags found
No related merge requests found
Pipeline #128518 failed
...@@ -139,8 +139,23 @@ function drawGenes(genesGroup) { ...@@ -139,8 +139,23 @@ function drawGenes(genesGroup) {
enter => { enter => {
const g = enter.append("g") const g = enter.append("g")
.classed("gene", true); .classed("gene", true);
g.append("path").classed("gene", true) g.append("path")
.classed("gene", true)
g.append("image") g.append("image")
.on("mouseover", function (event) {
console.log(event.srcElement)
d3.select(event.srcElement.previousSibling)
.attr("stroke-width", 4)
.attr("stroke", "darkred")
d3.select(event.srcElement).attr("cursor", "pointer")
})
.on("mouseout", function (event) {
d3.select(event.srcElement.previousSibling)
.attr("stroke-width", 0)
.attr("stroke", null)
d3.select(event.srcElement).attr("cursor", "unset")
})
g.append("text") g.append("text")
// .attr("fill", "white") // .attr("fill", "white")
.classed("gene-label", true) .classed("gene-label", true)
...@@ -158,9 +173,7 @@ function drawGenes(genesGroup) { ...@@ -158,9 +173,7 @@ function drawGenes(genesGroup) {
.attr("width", d => d.width) .attr("width", d => d.width)
.attr("height", d => d.height) .attr("height", d => d.height)
.on("click", function (event) { .on("click", function (event) {
console.log(event)
const data = d3.select(this).data() const data = d3.select(this).data()
console.log(data)
structureBasket.set(data.map(s => s.structPath)) structureBasket.set(data.map(s => s.structPath))
}) })
......
...@@ -164,11 +164,12 @@ function on(mark) { ...@@ -164,11 +164,12 @@ function on(mark) {
r.on("mouseover", function (event) { r.on("mouseover", function (event) {
const elem = d3.select(event.srcElement) const elem = d3.select(event.srcElement)
const elemFill = d3.color(elem.attr("fill")).darker() const fillColor = elem.attr("fill")
elem.attr("stroke-width", 4).attr("stroke", elemFill) const elemFill = d3.color(fillColor).darker()
elem.attr("stroke-width", 4).attr("stroke", elemFill.toString()).attr("cursor", "pointer")
}) })
r.on("mouseout", function (event) { r.on("mouseout", function (event) {
d3.select(event.srcElement).attr("stroke-width", undefined).attr("stroke", undefined) d3.select(event.srcElement).attr("stroke-width", null).attr("stroke", null).attr("cursor", "unset")
}) })
return g; return g;
......
...@@ -36,7 +36,6 @@ securityContext: ...@@ -36,7 +36,6 @@ securityContext:
allowPrivilegeEscalation: false allowPrivilegeEscalation: false
runAsUser: 101 runAsUser: 101
runAsGroup: 101 runAsGroup: 101
allowPrivilegeEscalation: false
# capabilities: # capabilities:
# drop: # drop:
# - ALL # - ALL
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment