use the header as a veiwport border for dialogs.
This commit is contained in:
parent
2f83193487
commit
7cacb568fb
@ -2113,6 +2113,8 @@
|
||||
dy: e.clientY - rect.top,
|
||||
height: screenHeight - rect.height,
|
||||
width: screenWidth - rect.width,
|
||||
topBorder: Conf["Bottom Header"] ? 0 : Header.bar.getBoundingClientRect().height,
|
||||
bottomBorder: Conf["Bottom Header"] ? Header.bar.getBoundingClientRect().height : 0,
|
||||
screenHeight: screenHeight,
|
||||
screenWidth: screenWidth,
|
||||
isTouching: isTouching
|
||||
@ -2149,9 +2151,9 @@
|
||||
left = clientX - this.dx;
|
||||
left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%';
|
||||
top = clientY - this.dy;
|
||||
top = top < 10 ? 0 : this.height - top < 10 ? null : top / this.screenHeight * 100 + '%';
|
||||
top = top < (10 + this.topBorder) ? this.topBorder + 'px' : this.height - top < (10 + this.bottomBorder) ? null : top / this.screenHeight * 100 + '%';
|
||||
right = left === null ? 0 : null;
|
||||
bottom = top === null ? 0 : null;
|
||||
bottom = top === null ? this.bottomBorder + 'px' : null;
|
||||
style = this.style;
|
||||
style.left = left;
|
||||
style.right = right;
|
||||
|
||||
@ -2109,6 +2109,8 @@
|
||||
dy: e.clientY - rect.top,
|
||||
height: screenHeight - rect.height,
|
||||
width: screenWidth - rect.width,
|
||||
topBorder: Conf["Bottom Header"] ? 0 : Header.bar.getBoundingClientRect().height,
|
||||
bottomBorder: Conf["Bottom Header"] ? Header.bar.getBoundingClientRect().height : 0,
|
||||
screenHeight: screenHeight,
|
||||
screenWidth: screenWidth,
|
||||
isTouching: isTouching
|
||||
@ -2145,9 +2147,9 @@
|
||||
left = clientX - this.dx;
|
||||
left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%';
|
||||
top = clientY - this.dy;
|
||||
top = top < 10 ? 0 : this.height - top < 10 ? null : top / this.screenHeight * 100 + '%';
|
||||
top = top < (10 + this.topBorder) ? this.topBorder + 'px' : this.height - top < (10 + this.bottomBorder) ? null : top / this.screenHeight * 100 + '%';
|
||||
right = left === null ? 0 : null;
|
||||
bottom = top === null ? 0 : null;
|
||||
bottom = top === null ? this.bottomBorder + 'px' : null;
|
||||
style = this.style;
|
||||
style.left = left;
|
||||
style.right = right;
|
||||
|
||||
@ -2022,6 +2022,8 @@
|
||||
dy: e.clientY - rect.top,
|
||||
height: screenHeight - rect.height,
|
||||
width: screenWidth - rect.width,
|
||||
topBorder: Conf["Bottom Header"] ? 0 : Header.bar.getBoundingClientRect().height,
|
||||
bottomBorder: Conf["Bottom Header"] ? Header.bar.getBoundingClientRect().height : 0,
|
||||
screenHeight: screenHeight,
|
||||
screenWidth: screenWidth,
|
||||
isTouching: isTouching
|
||||
@ -2058,9 +2060,9 @@
|
||||
left = clientX - this.dx;
|
||||
left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%';
|
||||
top = clientY - this.dy;
|
||||
top = top < 10 ? 0 : this.height - top < 10 ? null : top / this.screenHeight * 100 + '%';
|
||||
top = top < (10 + this.topBorder) ? this.topBorder + 'px' : this.height - top < (10 + this.bottomBorder) ? null : top / this.screenHeight * 100 + '%';
|
||||
right = left === null ? 0 : null;
|
||||
bottom = top === null ? 0 : null;
|
||||
bottom = top === null ? this.bottomBorder + 'px' : null;
|
||||
style = this.style;
|
||||
style.left = left;
|
||||
style.right = right;
|
||||
|
||||
@ -222,6 +222,8 @@ UI = do ->
|
||||
dy: e.clientY - rect.top
|
||||
height: screenHeight - rect.height
|
||||
width: screenWidth - rect.width
|
||||
topBorder: if Conf["Bottom Header"] then 0 else Header.bar.getBoundingClientRect().height
|
||||
bottomBorder: if Conf["Bottom Header"] then Header.bar.getBoundingClientRect().height else 0
|
||||
screenHeight: screenHeight
|
||||
screenWidth: screenWidth
|
||||
isTouching: isTouching
|
||||
@ -254,9 +256,9 @@ UI = do ->
|
||||
left / @screenWidth * 100 + '%'
|
||||
|
||||
top = clientY - @dy
|
||||
top = if top < 10
|
||||
0
|
||||
else if @height - top < 10
|
||||
top = if top < (10 + @topBorder)
|
||||
@topBorder + 'px'
|
||||
else if @height - top < (10 + @bottomBorder)
|
||||
null
|
||||
else
|
||||
top / @screenHeight * 100 + '%'
|
||||
@ -265,8 +267,9 @@ UI = do ->
|
||||
0
|
||||
else
|
||||
null
|
||||
|
||||
bottom = if top is null
|
||||
0
|
||||
@bottomBorder + 'px'
|
||||
else
|
||||
null
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user