|
@@ -83,10 +83,6 @@ export default class Shape extends Base {
|
|
annotation.color = '#000000'
|
|
annotation.color = '#000000'
|
|
}
|
|
}
|
|
|
|
|
|
- if (!annotation.bgColor) {
|
|
|
|
- annotation.bgColor = 'transparent'
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (!annotation.fontSize) {
|
|
if (!annotation.fontSize) {
|
|
annotation.fontSize = 16
|
|
annotation.fontSize = 16
|
|
}
|
|
}
|
|
@@ -119,7 +115,7 @@ export default class Shape extends Base {
|
|
lineHeight: '1.2em',
|
|
lineHeight: '1.2em',
|
|
padding: '2px 4px',
|
|
padding: '2px 4px',
|
|
overflow: 'auto',
|
|
overflow: 'auto',
|
|
- backgroundColor: annotation.bgColor,
|
|
|
|
|
|
+ backgroundColor: annotation.bgColor ? annotation.bgColor : 'transparent',
|
|
'-webkit-user-select': 'text'
|
|
'-webkit-user-select': 'text'
|
|
})
|
|
})
|
|
|
|
|
|
@@ -137,7 +133,7 @@ export default class Shape extends Base {
|
|
lineHeight: '1.2em',
|
|
lineHeight: '1.2em',
|
|
padding: '2px 4px',
|
|
padding: '2px 4px',
|
|
overflow: 'hidden',
|
|
overflow: 'hidden',
|
|
- backgroundColor: annotation.bgColor
|
|
|
|
|
|
+ backgroundColor: annotation.bgColor ? annotation.bgColor : 'transparent',
|
|
})
|
|
})
|
|
if (annotation.contents) {
|
|
if (annotation.contents) {
|
|
freetextElement.innerHTML = annotation.contents
|
|
freetextElement.innerHTML = annotation.contents
|
|
@@ -788,10 +784,10 @@ export default class Shape extends Base {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if ((minPage + 2) === maxPage || (minPage === 1 && maxPage === 2)) {
|
|
if ((minPage + 2) === maxPage || (minPage === 1 && maxPage === 2)) {
|
|
- left = pageX - (startState.clickX - leftTop.x)
|
|
|
|
- top = page.first > (this.page + 1) ? pagePoint.y : pagePoint.y - annotationHeight
|
|
|
|
- right = pageX - (startState.clickX - rightBottom.x)
|
|
|
|
- bottom = page.first > (this.page + 1) ? pagePoint.y + annotationHeight : pagePoint.y
|
|
|
|
|
|
+ left = pageX - (startState.clickX - leftTop.x)
|
|
|
|
+ top = page.first > (this.page + 1) ? pagePoint.y : pagePoint.y - annotationHeight
|
|
|
|
+ right = pageX - (startState.clickX - rightBottom.x)
|
|
|
|
+ bottom = page.first > (this.page + 1) ? pagePoint.y + annotationHeight : pagePoint.y
|
|
} else if ((minPage + 1) === maxPage) {
|
|
} else if ((minPage + 1) === maxPage) {
|
|
left = page.first > (this.page + 1) ? pagePoint.x : pagePoint.x - annotationWidth
|
|
left = page.first > (this.page + 1) ? pagePoint.x : pagePoint.x - annotationWidth
|
|
top = pageY - (startState.clickY - leftTop.y)
|
|
top = pageY - (startState.clickY - leftTop.y)
|