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