From 564121428cfed6fadfd09839ed157aee126f78c1 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 14 Dec 2022 11:31:12 -0500 Subject: [PATCH] removed polling vs resizeviewer option from demo --- test/demo/resizeviewer.html | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/test/demo/resizeviewer.html b/test/demo/resizeviewer.html index faa4cba9..f3e89963 100644 --- a/test/demo/resizeviewer.html +++ b/test/demo/resizeviewer.html @@ -98,13 +98,6 @@

These options apply to both of the demo viewers on the left (top and bottom).

-
-
Use polling
-
-
-
Use ResizeObserver
-
-
preserveImageSizeOnResize: false
@@ -169,22 +162,7 @@ function updateViewer(){ viewer.preserveImageSizeOnResize = !!parseInt($('.preserve-method.selected').data('value')); - viewer.autoResize = !!parseInt($('.auto-method.selected').data('value')); - - var useResizeObserver=!!parseInt($('.listener-method.selected').data('value')); - if(useResizeObserver){ - if(viewer._resizeObserver && viewer._autoResizePolling){ - viewer._resizeObserver.observe(viewer.container); - viewer._autoResizePolling = false; - } - } else { - if(viewer._resizeObserver && !viewer._autoResizePolling){ - viewer._resizeObserver.observe(viewer.container); - viewer._autoResizePolling = true; - } - } - } $('.preserve-method').on('click',function(){ @@ -197,15 +175,6 @@ $(this).addClass('selected'); }); - - if(!window.ResizeObserver){ - $('.listener-method[data-value=1]').text('ResizeObserver not support in your browser').addClass('invalid'); - } - $('.listener-method').on('click',function(){ - $('.listener-method').removeClass('selected'); - if(!$(this).hasClass('invalid')) $(this).addClass('selected'); - }) - $('.method').on('click',updateViewer); var container = $('.inner-container');