
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
控制DOM结构移动、缩放、旋转的集成方法,支持鼠标开启部分功能操作;Move, zoom, rotate the mobile device DOM element, then output the total amount of change.Pc device partial support.
It is an external method that integrates the functionality of the hammer.js. It is mainly used in mobile touch device, and the pc devices also supports incomplete functions.Provides output of the total output value of the moving, scaling and rotating functions of the selected element object on the DOM structure.The zoom function on the pc device is turned off by default. If you need to enable the parameter to be set to (true), the premise is that there is support for the mouse scroll event.
There must be a hammerjs dependency package in the module, and there is no need to require it again in the process of project development.
In order to achieve good device compatibility, the js startup file can add the screen-pl requirement module.
System Support: Mobile browser kernel Android4.4+ 、ios ;Pc browser kernel webkit、Chrome、Gecko...
npm install domhammer --save
Add the requirement JS library file to the code,The output is a method that provides three parameters [obj, callbakck, boolean].Obj is the object chosen to run,Callback is the result of the return after running. Boolean is a unique parameter of the pc device, Controls the scaling of the obj mouse scroll event.This js also provides a method of destroying destroy(obj).
###JavaScript:
let domhammer= require('domhammer');
let obj = document.querySelector('div');
domhammer(obj,function(res){
console.log(res)
});
###html:
<body>
<div></div>
</body>
FAQs
控制DOM结构移动、缩放、旋转的集成方法,支持鼠标开启部分功能操作;Move, zoom, rotate the mobile device DOM element, then output the total amount of change.Pc device partial support.
We found that domhammer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.