@@ -392,27 +392,26 @@ QUnit.module('Panzoom', () => {
392392 QUnit . test ( 'force option ignored when passed to Panzoom()' , ( assert ) => {
393393 const div = document . createElement ( 'div' )
394394 document . body . appendChild ( div )
395- const panzoom = Panzoom ( div , { force : true } )
395+ const panzoom = Panzoom ( div , { disablePan : true , force : true } )
396396 panzoom . pan ( 1 , 1 )
397397 const pan = panzoom . getPan ( )
398- assert . strictEqual ( pan . x , 1 )
399- assert . strictEqual ( pan . y , 1 )
398+ assert . strictEqual ( pan . x , 0 )
399+ assert . strictEqual ( pan . y , 0 )
400400 document . body . removeChild ( div )
401401 } )
402402 QUnit . test ( 'force option ignored when passed to setOptions()' , ( assert ) => {
403403 const div = document . createElement ( 'div' )
404404 document . body . appendChild ( div )
405405 const panzoom = Panzoom ( div )
406- panzoom . setOptions ( { force : true } )
406+ panzoom . setOptions ( { disablePan : true , force : true } )
407407 panzoom . pan ( 1 , 1 )
408408 const pan = panzoom . getPan ( )
409- assert . strictEqual ( pan . x , 1 )
410- assert . strictEqual ( pan . y , 1 )
411- panzoom . setOptions ( { disablePan : true } )
412- panzoom . pan ( 2 , 2 , { force : true } ) // Still works at method level
409+ assert . strictEqual ( pan . x , 0 )
410+ assert . strictEqual ( pan . y , 0 )
411+ panzoom . pan ( 1 , 1 , { force : true } )
413412 const pan2 = panzoom . getPan ( )
414- assert . strictEqual ( pan2 . x , 2 )
415- assert . strictEqual ( pan2 . y , 2 )
413+ assert . strictEqual ( pan2 . x , 1 )
414+ assert . strictEqual ( pan2 . y , 1 )
416415 document . body . removeChild ( div )
417416 } )
418417 } )
0 commit comments