Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple JavaScript framework for Drawing on the web.(一个面向Web绘图的JavaScript框架)

License

NotificationsYou must be signed in to change notification settings

idrawjs/idraw

Repository files navigation

iDraw.js Logo

iDraw.js

iDraw.js is a simple JavaScript framework for Drawing on the web.

一个面向Web绘图的JavaScript框架

idrawjs.com

CIVersionLicense


Sponsors

iDraw.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome backers. If you'd like to join them, please considersponsoring iDrawjs's development.

Become a Backer

@idraw/studio Preview

The preview of@idraw/studo. Clickhere to get it.

idraw-studio-light-themeidraw-studio-dark-theme

Install

npm i idraw

Getting Started

Common

import{iDraw}from'idraw';constidraw=newiDraw(document.querySelector('#app'),{width:600,height:400,devicePixelRatio:1,});idraw.addElement({name:"rect-1",x:140,y:120,w:200,h:100,type:"rect",detail:{background:"#f7d3c1",borderRadius:20,borderWidth:4,borderColor:"#ff6032",},});

React

import{iDraw}from'idraw';import{useEffect,useRef}from'react';functionDemo(){constref=useRef(null);useEffect(()=>{constidraw=newiDraw(ref.current,{width:600,height:400,devicePixelRatio:1,});idraw.addElement({name:"rect-001",x:140,y:120,w:200,h:100,type:"rect",detail:{background:"#f7d3c1",borderRadius:20,borderWidth:4,borderColor:"#ff6032",},})},[]);return(<divref={ref}></div>)}

Vue

<template><divref="mount"></div></template><scriptsetup>import{iDraw}from'idraw';import{ref,onMounted}from'vue'constmount=ref();onMounted(()=>{constidraw=newiDraw(mount.value,{width:600,height:400,devicePixelRatio:1,});idraw.addElement({name:"rect-001",x:140,y:120,w:200,h:100,type:"rect",detail:{background:"#f7d3c1",borderRadius:20,borderWidth:4,borderColor:"#ff6032",},})})</script>

Contributing

We appreciate your help!

To contribute, please follow the steps:

  • git clone git@github.com:idrawjs/idraw.git
  • cd idraw
  • pnpm i
  • npm run dev

[8]ページ先頭

©2009-2025 Movatter.jp