npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-draggable-resizer

v0.1.4

Published

Draggable and resizable component for vue3, and, support element adsorption alignment, real-time reference line, Support Rotation,Support z-index etc.

Downloads

3

Readme

[Vue3 组件] 用于拖拽调整位置和大小的的组件,同时支持冲突检测,元素吸附对齐,实时参考线。基于vue3-draggable-resizable组件修改而来,非原创。 [ Vue3 Component ] Draggable and resizable component for vue3, and, support element adsorption alignment, real-time reference line, etc. [Special Note] This component is based on vue3-draggable-resizable Modified,Not original。 [New Features] Support Rotation And zIndex

Table of Contents

Features

  • Draggable and resizable
  • Define handles for resizing
  • Restrict movement and size in parent node
  • Customize various class names
  • Provide your own markup for handles
  • Adsorption alignment
  • Reference line
  • Support Rotation
  • Support zIndex

Usage

$ npm install vue3-draggable-resizer

Register the Vue3DraggableResizer

// >main.js
import { createApp } from "vue";
import App from "./App.vue";
import DraggableResizer from "vue3-draggable-resizer";
//default styles
import "vue3-draggable-resizer/style.css";

// You will have a global component named "DraggableResizer"
createApp(App).use(DraggableResizer).mount("#app");

You can also use it separately within the component

// >component.js
import { defineComponent } from "vue";
import DraggableResizer from "vue3-draggable-resizer";
//default styles
import "vue3-draggable-resizer/style.css";

export default defineComponent({
  components: { DraggableResizer },
  // ...other
});

Here is a complete example of using "vue-template"

<template>
  <div id="app">
    <div class="parent">
      <DraggableResizer
        :initW="110"
        :initH="120"
        :z="zIndex"
        v-model:x="x"
        v-model:y="y"
        v-model:w="w"
        v-model:h="h"
        v-model:r="rotate"
        v-model:active="active"
        :draggable="true"
        :resizable="true"
        @activated="print('activated')"
        @deactivated="print('deactivated')"
        @drag-start="print('drag-start')"
        @resize-start="print('resize-start')"
        @dragging="print('dragging')"
        @resizing="print('resizing')"
        @drag-end="print('drag-end')"
        @resize-end="print('resize-end')"
        @rotating="print('rotating')"
        @rotate-start="print('rotat-start')"
        @rotate-end="print('rotat-end')"
      >
        This is a test example
      </DraggableResizer>
    </div>
  </div>
</template>