|
@ -3,6 +3,8 @@ import { Tabs, Tab } from "react-tabs-scrollable"; |
|
|
import "react-tabs-scrollable/dist/rts.css"; |
|
|
import "react-tabs-scrollable/dist/rts.css"; |
|
|
import { getHeatmapData } from "./webpage_container/StudySite"; |
|
|
import { getHeatmapData } from "./webpage_container/StudySite"; |
|
|
import { pushToMouseLog } from "../core/log/SensorLogger"; |
|
|
import { pushToMouseLog } from "../core/log/SensorLogger"; |
|
|
|
|
|
import { playTabModelSonification } from "../core/audio/AudioHandler"; |
|
|
|
|
|
import { Divider } from "@geist-ui/core"; |
|
|
|
|
|
|
|
|
var amountTabs = 0; |
|
|
var amountTabs = 0; |
|
|
var reachedEndValue = false; |
|
|
var reachedEndValue = false; |
|
@ -19,7 +21,6 @@ function ScrollableTab({ onActiveTabChange, children }) { |
|
|
// define a onClick function to bind the value on tab click |
|
|
// define a onClick function to bind the value on tab click |
|
|
const onTabClick = (e, index) => { |
|
|
const onTabClick = (e, index) => { |
|
|
const buttonAttributes = e.target.attributes; |
|
|
const buttonAttributes = e.target.attributes; |
|
|
console.log(buttonAttributes); |
|
|
|
|
|
const actionType = buttonAttributes["actionType"] |
|
|
const actionType = buttonAttributes["actionType"] |
|
|
? buttonAttributes.getNamedItem("actionType").value |
|
|
? buttonAttributes.getNamedItem("actionType").value |
|
|
: ""; |
|
|
: ""; |
|
@ -62,6 +63,8 @@ function ScrollableTab({ onActiveTabChange, children }) { |
|
|
reachedEndValue = true; |
|
|
reachedEndValue = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
playTabModelSonification(); |
|
|
|
|
|
|
|
|
if (reachedEndValue && endValueVisible) { |
|
|
if (reachedEndValue && endValueVisible) { |
|
|
//this.playChordEndSound(); |
|
|
//this.playChordEndSound(); |
|
|
if (rightSideEnd) { |
|
|
if (rightSideEnd) { |
|
@ -114,10 +117,27 @@ function ScrollableTab({ onActiveTabChange, children }) { |
|
|
); |
|
|
); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const tabsStyle = { position: "absolute", bottom: "0", width: "100vw" }; |
|
|
|
|
|
|
|
|
const tabsStyle = { |
|
|
|
|
|
position: "fixed", |
|
|
|
|
|
bottom: "0", |
|
|
|
|
|
width: "100vw", |
|
|
|
|
|
zIndex: "998", |
|
|
|
|
|
backgroundColor: "white", |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<div style={tabsStyle}> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
style={tabsStyle} |
|
|
|
|
|
onClick={() => {}} |
|
|
|
|
|
onTouchStart={(event) => { |
|
|
|
|
|
const eventElement = event.target; |
|
|
|
|
|
|
|
|
|
|
|
if (eventElement.nodeName === "BUTTON") { |
|
|
|
|
|
onHoverTab(eventElement.id); |
|
|
|
|
|
} |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
<Divider /> |
|
|
<Tabs |
|
|
<Tabs |
|
|
onMouseOver={() => onHoverElement()} |
|
|
onMouseOver={() => onHoverElement()} |
|
|
activeTab={activeTab} |
|
|
activeTab={activeTab} |
|
|