When I use Simulator.gestures.pinch, I expect a pinch event to eventually fire with the scale I specify as an option. So, in the following test case:
package.json:
{
"dependencies": {
"hammer-simulator": "0.0.1",
"hammerjs": "2.0.8"
}
}
index.html:
<body>
<div class="test-element"></div>
<script src="node_modules/hammerjs/hammer.js"></script>
<script src="node_modules/hammer-simulator/index.js"></script>
<script src="test.js"></script>
</body>
test.js:
(function () {
'use strict';
var element = document.querySelector('.test-element');
var hammertime = new Hammer(element);
hammertime.get('pinch').set({enable: true});
hammertime.on('pinch', function (event) {
console.log('event.scale', event.scale);
});
Simulator.gestures.pinch(element, {
scale: 2.0
});
}());
I expect that an event.scale of 2 will eventually be logged. However, the final value to be printed is only 1.9230769230769231. Is this expected or is it a bug?
When I use
Simulator.gestures.pinch, I expect a pinch event to eventually fire with the scale I specify as an option. So, in the following test case:package.json:
{ "dependencies": { "hammer-simulator": "0.0.1", "hammerjs": "2.0.8" } }index.html:
test.js:
I expect that an
event.scaleof2will eventually be logged. However, the final value to be printed is only1.9230769230769231. Is this expected or is it a bug?