|
@@ -44,6 +44,7 @@ export default class Stamp extends Base {
|
|
|
this.endCircle = null
|
|
|
|
|
|
this.show = show
|
|
|
+ this.ratio = window.devicePixelRatio || 1
|
|
|
|
|
|
this.onMousedown = this.handleMouseDown.bind(this)
|
|
|
this.onMouseup = this.handleMouseUp.bind(this)
|
|
@@ -119,14 +120,14 @@ export default class Stamp extends Base {
|
|
|
imgSrc = annotation.image
|
|
|
} else if (annotation.stampType === 'standard' || annotation.stampType === 'image' || annotation.stampType === 'text') {
|
|
|
const imgRect = {
|
|
|
- width: parseInt(rect.width + 1),
|
|
|
- height: parseInt(rect.height + 1)
|
|
|
+ width: parseInt(rect.width * this.ratio + 1),
|
|
|
+ height: parseInt(rect.height * this.ratio + 1)
|
|
|
}
|
|
|
|
|
|
const imageArray = await this.messageHandler.sendWithPromise('GetRenderAnnot', {
|
|
|
annotPtr: this.annotation.annotPtr,
|
|
|
rect: this.annotation.rect,
|
|
|
- scale: this.scale
|
|
|
+ scale: this.scale * this.ratio
|
|
|
})
|
|
|
|
|
|
const canvas = document.createElement('canvas')
|
|
@@ -409,7 +410,7 @@ export default class Stamp extends Base {
|
|
|
event.stopPropagation()
|
|
|
}
|
|
|
if (event.type === 'touchstart') {
|
|
|
- document.body.style.overscrollBehavior = 'none';
|
|
|
+ document.querySelector('.document-container').style.overflow = 'hidden'
|
|
|
document.body.style.userSelect = 'none';
|
|
|
document.getElementById('app').style.touchAction = 'none';
|
|
|
document.querySelector('.document-container').style.overflow = 'hidden'
|
|
@@ -591,7 +592,7 @@ export default class Stamp extends Base {
|
|
|
event.stopPropagation()
|
|
|
}
|
|
|
if (event.type === 'touchend') {
|
|
|
- document.body.style.overscrollBehavior = 'auto';
|
|
|
+ document.querySelector('.document-container').style.overflow = 'auto'
|
|
|
document.body.style.userSelect = 'auto';
|
|
|
document.getElementById('app').style.touchAction = 'auto';
|
|
|
document.querySelector('.document-container').style.overflow = 'auto'
|