Last active
January 28, 2021 21:45
-
-
Save rschwabco/7a6dcaf5c11026c31776b1ebfdc51737 to your computer and use it in GitHub Desktop.
Fleet Schedule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fleet Schedule | |
onMouseInVessel -> Vessel Active | |
onMouseInRequirement -> Requirement Active | |
onMouseOutRequirement -> Idle | |
Idle* | |
Vessel Active | |
onVesselClick -> Vessel In Details Panel | |
onMouseOutVessel -> Idle | |
Vessel In Details Panel | |
onRightClick -> Vessel Unassignment in Details Panel | |
onMouseOutVessel -> Vessel In Details Panel | |
Vessel Unassignment in Details Panel | |
Requirement Active | |
onRequirementClick -> Click Requirement | |
onDrag -> Dragging | |
Click Requirement | |
Right Click Requirement | |
DetailPanelShown | |
Dragging | |
onDrop -> Drop | |
Drop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
var activeStates = model.active_states.map(x => x.name); | |
return $('div', | |
$('div', {style: {position: "relative", left: 50, top: 30, padding: 40, margin: 30, fontFamily: "sans-serif" },}, | |
`${activeStates.join(",")}`) , | |
$('button', {style: {position: "relative", left: 50, top: 30, padding: 40, margin: 30, fontFamily: "sans-serif" }, | |
draggable: false, | |
onClick: function(){ model.emit("onVesselClick") }, | |
onMouseEnter: function(){ model.emit('onMouseInVessel')}, | |
onMouseLeave: function(){ model.emit('onMouseOutVessel')}, | |
}, | |
`Vessel`) , | |
$('button', {style: {position: "relative", left: 50, top: 30, padding: 40, margin: 30, fontFamily: "sans-serif"}, | |
draggable: true, | |
onClick: function(){ model.emit("onRequirementClick") }, | |
onMouseEnter: function(){ model.emit('onMouseInRequirement')}, | |
onMouseLeave: function(){ model.emit('onMouseOutRequirement')}, | |
onDragStart: function(){ model.emit('onDrag')}, | |
onDragEnd: function(){ model.emit('onDrop')}, | |
}, | |
`Requirement`) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment