summaryrefslogtreecommitdiffstats
path: root/loleaflet/src/layer/tile/ScrollSection.ts
diff options
context:
space:
mode:
Diffstat (limited to 'loleaflet/src/layer/tile/ScrollSection.ts')
-rw-r--r--loleaflet/src/layer/tile/ScrollSection.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/loleaflet/src/layer/tile/ScrollSection.ts b/loleaflet/src/layer/tile/ScrollSection.ts
index ed15ec7415..a1df8563fe 100644
--- a/loleaflet/src/layer/tile/ScrollSection.ts
+++ b/loleaflet/src/layer/tile/ScrollSection.ts
@@ -389,6 +389,19 @@ class ScrollSection {
this.context.fillRect(startX, scrollProps.startY, this.sectionProperties.scrollBarThickness, scrollProps.scrollSize - this.sectionProperties.scrollBarThickness);
this.context.globalAlpha = 1.0;
+
+ if (this.containerObject.testing) {
+ var element: HTMLDivElement = <HTMLDivElement>document.getElementById('test-div-vertical-scrollbar');
+ if (!element) {
+ element = document.createElement('div');
+ element.id = 'test-div-vertical-scrollbar';
+ document.body.appendChild(element);
+ }
+ element.textContent = String(scrollProps.startY);
+ element.style.display = 'none';
+ element.style.position = 'fixed';
+ element.style.zIndex = '-1';
+ }
}
private drawHorizontalScrollBar () {
@@ -406,6 +419,20 @@ class ScrollSection {
this.context.fillRect(scrollProps.startX, startY, scrollProps.scrollSize - this.sectionProperties.scrollBarThickness, this.sectionProperties.scrollBarThickness);
this.context.globalAlpha = 1.0;
+
+ if (this.containerObject.testing) {
+ var element: HTMLDivElement = <HTMLDivElement>document.getElementById('test-div-horizontal-scrollbar');
+ if (!element) {
+ element = document.createElement('div');
+ element.id = 'test-div-horizontal-scrollbar';
+ document.body.appendChild(element);
+ }
+ element.textContent = String(scrollProps.startX);
+ element.style.display = 'none';
+ element.style.position = 'fixed';
+ element.style.zIndex = '-1';
+ }
+
}
private calculateCurrentAlpha (elapsedTime: number) {