0.4.0-alpha.21 • Published 1 month ago

@idraw/studio v0.4.0-alpha.21

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@idraw/studio

Sponsors

@idraw/studio 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 consider sponsoring iDrawjs's development.

Become a Backer

@idraw/studio Preview

You can click idrawjs.com/studio/ to experience it.

The preview of @idraw/studo.

Usage

# Install peer dependcies
npm install antd idraw

npm install @idraw/studio
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { Studio } from '@idraw/studio';
import '@idraw/studio/dist/css/index.css'

const App = () => { 
  const [width, setWidth] = useState<number>(window.innerWidth);
  const [height, setHeight] = useState<number>(window.innerHeight);
  useEffect(() => {
    window.addEventListener('resize', () => {
      setWidth(window.innerWidth);
      setHeight(window.innerHeight);
    });
  }, []); 

  return (
    <Studio
      width={width}
      height={height} 
      data={data}
      defaultScaleInfo={{ 
        scale: 1,
        offsetX: 0,
        offsetY: 0
      }}
    />
  );
};

const root = createRoot(document.querySelector('#app'));
root.render(<App />);

Development

git clone git@github.com:idrawjs/studio.git

cd studio

pnpm install

npm run dev
0.4.0-alpha.21

1 month ago

0.4.0-alpha.20

1 month ago

0.4.0-alpha.19

2 months ago

0.4.0-alpha.18

2 months ago

0.4.0-alpha.16

2 months ago

0.4.0-alpha.15

3 months ago

0.4.0-alpha.14

3 months ago

0.4.0-alpha.13

3 months ago

0.4.0-alpha.12

3 months ago

0.4.0-alpha.11

3 months ago

0.4.0-alpha.10

4 months ago

0.4.0-alpha.9

4 months ago

0.4.0-alpha.8

4 months ago

0.4.0-alpha.7

5 months ago

0.4.0-alpha.6

5 months ago

0.4.0-alpha.4

5 months ago

0.4.0-alpha.3

5 months ago

0.4.0-alpha.2

5 months ago

0.4.0-alpha.1

5 months ago

0.4.0-alpha.0

5 months ago

0.4.0-alpha.5

5 months ago

0.2.0-alpha.0

1 year ago

0.1.0-alpha.1

2 years ago

0.1.0-alpha.0

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.1

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.4

3 years ago

0.0.0

3 years ago