Commit 7df7231b authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Rename `.annotator-no-transition` -> `.sidebar-no-transition`

Rename this class to be consistent with other class names in this module
parent 6bb633e6
...@@ -493,7 +493,7 @@ export class Sidebar { ...@@ -493,7 +493,7 @@ export class Sidebar {
this._resetGestureState(); this._resetGestureState();
// Disable animated transition of sidebar position // Disable animated transition of sidebar position
frame.classList.add('annotator-no-transition'); frame.classList.add('sidebar-no-transition');
// Disable pointer events on the iframe. // Disable pointer events on the iframe.
frame.style.pointerEvents = 'none'; frame.style.pointerEvents = 'none';
...@@ -504,7 +504,7 @@ export class Sidebar { ...@@ -504,7 +504,7 @@ export class Sidebar {
break; break;
case 'panend': case 'panend':
frame.classList.remove('annotator-no-transition'); frame.classList.remove('sidebar-no-transition');
// Re-enable pointer events on the iframe. // Re-enable pointer events on the iframe.
frame.style.pointerEvents = ''; frame.style.pointerEvents = '';
......
...@@ -531,7 +531,7 @@ describe('Sidebar', () => { ...@@ -531,7 +531,7 @@ describe('Sidebar', () => {
sidebar._onPan({ type: 'panstart' }); sidebar._onPan({ type: 'panstart' });
assert.isTrue( assert.isTrue(
sidebar.iframeContainer.classList.contains('annotator-no-transition') sidebar.iframeContainer.classList.contains('sidebar-no-transition')
); );
assert.equal(sidebar.iframeContainer.style.pointerEvents, 'none'); assert.equal(sidebar.iframeContainer.style.pointerEvents, 'none');
}); });
...@@ -550,7 +550,7 @@ describe('Sidebar', () => { ...@@ -550,7 +550,7 @@ describe('Sidebar', () => {
sidebar._gestureState = { final: 0 }; sidebar._gestureState = { final: 0 };
sidebar._onPan({ type: 'panend' }); sidebar._onPan({ type: 'panend' });
assert.isFalse( assert.isFalse(
sidebar.iframeContainer.classList.contains('annotator-no-transition') sidebar.iframeContainer.classList.contains('sidebar-no-transition')
); );
assert.equal(sidebar.iframeContainer.style.pointerEvents, ''); assert.equal(sidebar.iframeContainer.style.pointerEvents, '');
}); });
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
// this disables the width transition for the sidebar when // this disables the width transition for the sidebar when
// it is manually resized by dragging // it is manually resized by dragging
.annotator-no-transition { .sidebar-no-transition {
transition: none !important; transition: none !important;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment