implement pinch to zoom

This commit is contained in:
marlon-erler
2026-08-30 16:15:14 +02:00
parent ea50704f8a
commit 7eb02f07dc
160 changed files with 15806 additions and 61 deletions
+45
View File
@@ -0,0 +1,45 @@
<html>
<head>
<title>Events</title>
<style>
body {
padding: 150px;
}
ul li {
padding: 5px;
}
</style>
</head>
<body>
<ul>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
<button onclick="unbind()">Unbind</button>
<script src="../build/build.js"></script>
<script>
var Events = require('events');
var ul = document.querySelector('ul');
var events = Events(ul, {
onclick: function(e){
alert('clicked ' + e.target.textContent)
},
first: function(e){
alert('clicked the first');
}
});
events.bind('click li > a');
events.bind('click li:first-child > a', 'first');
function unbind() {
events.unbind('click', 'onclick');
// events.unbind('click');
// events.unbind();
}
</script>
</body>
</html>
+26
View File
@@ -0,0 +1,26 @@
<html>
<head>
<title>Events</title>
</head>
<body>
<button>Click me</button>
<button onclick="unbind()">Unbind</button>
<script src="../build/build.js"></script>
<script>
var Events = require('events');
var button = document.querySelector('button');
var events = Events(button, {
onclick: function(){
alert('clicked')
}
});
events.bind('click');
function unbind() {
events.unbind();
}
</script>
</body>
</html>
+26
View File
@@ -0,0 +1,26 @@
<html>
<head>
<title>Events</title>
</head>
<body>
<button>Click me</button>
<button onclick="unbind()">Unbind</button>
<script src="../build/build.js"></script>
<script>
var Events = require('events');
var button = document.querySelector('button');
var events = Events(button, {
remove: function(){
alert('removed')
}
});
events.bind('click', 'remove');
function unbind() {
events.unbind();
}
</script>
</body>
</html>