Compare commits
No commits in common. "dbdec93efc7b1f5f38da2752fc58613cfabb2f0c" and "5931dcdc6762ffa454ce65f99001826813bd4906" have entirely different histories.
dbdec93efc
...
5931dcdc67
|
|
@ -691,14 +691,13 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
cornerstoneToolsMouseMove(e) {
|
cornerstoneToolsMouseMove(e) {
|
||||||
try {
|
|
||||||
const { currentPoints } = e.detail
|
const { currentPoints } = e.detail
|
||||||
const worldPoint = currentPoints.world
|
const worldPoint = currentPoints.world
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
let referencedImageId = viewport.getCurrentImageId()
|
let referencedImageId = viewport.getCurrentImageId()
|
||||||
const data = viewport.getImageData()
|
const data = viewport.getImageData()
|
||||||
if (!data || !referencedImageId) return
|
if (!data) return
|
||||||
const { dimensions, imageData, metadata, voxelManager } = data
|
const { dimensions, imageData, metadata, voxelManager } = data
|
||||||
const index = imageData.worldToIndex(worldPoint)
|
const index = imageData.worldToIndex(worldPoint)
|
||||||
index[0] = Math.floor(index[0])
|
index[0] = Math.floor(index[0])
|
||||||
|
|
@ -738,9 +737,6 @@ export default {
|
||||||
this.mousePosition.value = value
|
this.mousePosition.value = value
|
||||||
this.mousePosition.modalityUnit = modalityUnit
|
this.mousePosition.modalityUnit = modalityUnit
|
||||||
}
|
}
|
||||||
} catch(e) {
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toggleTask(evt, visitTaskNum, i) {
|
toggleTask(evt, visitTaskNum, i) {
|
||||||
this.$emit('activeViewport', this.viewportIndex)
|
this.$emit('activeViewport', this.viewportIndex)
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@ export default {
|
||||||
range: 40,
|
range: 40,
|
||||||
upper: 6,
|
upper: 6,
|
||||||
isSlideMoving: false,
|
isSlideMoving: false,
|
||||||
req: null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -138,23 +137,23 @@ export default {
|
||||||
})
|
})
|
||||||
document.addEventListener('mousemove', (e) => {
|
document.addEventListener('mousemove', (e) => {
|
||||||
if (this.isSlideMoving) {
|
if (this.isSlideMoving) {
|
||||||
if (this.req) return;
|
|
||||||
this.req = requestAnimationFrame(() => {
|
|
||||||
this.req = null;
|
|
||||||
var containerWidth = container.clientWidth
|
var containerWidth = container.clientWidth
|
||||||
var sliderWidth = sliderBox.clientWidth
|
var sliderWidth = sliderBox.clientWidth
|
||||||
var maxLeft = containerWidth - sliderWidth
|
var maxLeft = containerWidth - sliderWidth
|
||||||
if (maxLeft <= 0) return
|
if (maxLeft <= 0) return
|
||||||
|
|
||||||
var left = e.clientX - container.getBoundingClientRect().left
|
var left = e.clientX - container.getBoundingClientRect().left
|
||||||
|
var position = null
|
||||||
|
position = left
|
||||||
if (left < 0) {
|
if (left < 0) {
|
||||||
left = 0
|
left = 6
|
||||||
|
position = 0
|
||||||
} else if (left > maxLeft) {
|
} else if (left > maxLeft) {
|
||||||
left = maxLeft
|
left = maxLeft + 6
|
||||||
|
position = maxLeft
|
||||||
}
|
}
|
||||||
var position = left
|
|
||||||
|
|
||||||
slider.style.left = (left + 6) + 'px'
|
slider.style.left = left + 'px'
|
||||||
var positionValue = document.getElementById('slider-position')
|
var positionValue = document.getElementById('slider-position')
|
||||||
var upper = Number(this.range) || 0
|
var upper = Number(this.range) || 0
|
||||||
position = parseInt((position / maxLeft) * upper)
|
position = parseInt((position / maxLeft) * upper)
|
||||||
|
|
@ -168,7 +167,6 @@ export default {
|
||||||
}
|
}
|
||||||
this.upper = position
|
this.upper = position
|
||||||
this.voiChange(position)
|
this.voiChange(position)
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
document.addEventListener('mouseup', () => {
|
document.addEventListener('mouseup', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue