Skip to content

Commit

Permalink
modified getCanvasImage function
Browse files Browse the repository at this point in the history
  • Loading branch information
captainIN committed Jul 13, 2024
1 parent 9ee993e commit 3512dcd
Show file tree
Hide file tree
Showing 16 changed files with 39,743 additions and 29,765 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ assignees: ''
To make it easier for us to help you, please include as much useful information as possible.
Useful Links:
- tutorial: https://github.com/nhn/tui.image-editor/tree/master/docs
- tutorial: https://github.com/TheBrandwick/tui.image-editor/tree/master/docs
- API/Example: https://nhn.github.io/tui.image-editor/latest
Before opening a new issue, please search existing issues https://github.com/nhn/tui.image-editor/issues
Before opening a new issue, please search existing issues https://github.com/TheBrandwick/tui.image-editor/issues
-->

**Summary**
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

> Full featured image editor using HTML5 Canvas. It's easy to use and provides powerful filters.
[![github version](https://img.shields.io/github/release/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/releases/latest)
[![github version](https://img.shields.io/github/release/nhn/tui.image-editor.svg)](https://github.com/TheBrandwick/tui.image-editor/releases/latest)
[![npm version](https://img.shields.io/npm/v/tui-image-editor.svg)](https://www.npmjs.com/package/tui-image-editor)
[![license](https://img.shields.io/github/license/nhn/tui.image-editor.svg)](https://github.com/nhn/tui.image-editor/blob/master/LICENSE)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/nhn/tui.image-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![license](https://img.shields.io/github/license/nhn/tui.image-editor.svg)](https://github.com/TheBrandwick/tui.image-editor/blob/master/LICENSE)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/TheBrandwick/tui.image-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![code with hearth by NHN Cloud](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN_CLOUD-ff1414.svg)](https://github.com/nhn)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)

## 📦 Packages

- [toast-ui.image-editor](https://github.com/nhn/tui.image-editor/tree/master/apps/image-editor
- [toast-ui.image-editor](https://github.com/TheBrandwick/tui.image-editor/tree/master/apps/image-editor
) - Plain JavaScript component implemented by [NHN Cloud](https://github.com/nhn).
- [toast-ui.vue-image-editor](https://github.com/nhn/tui.image-editor/tree/master/apps/vue-image-editor
- [toast-ui.vue-image-editor](https://github.com/TheBrandwick/tui.image-editor/tree/master/apps/vue-image-editor
) - **Vue** wrapper component is powered by [NHN Cloud](https://github.com/nhn).
- [toast-ui.react-image-editor](https://github.com/nhn/tui.image-editor/tree/master/apps/react-image-editor
- [toast-ui.react-image-editor](https://github.com/TheBrandwick/tui.image-editor/tree/master/apps/react-image-editor
) - **React** wrapper component is powered by [NHN Cloud](https://github.com/nhn).

![6 -20-2018 17-45-54](https://user-images.githubusercontent.com/35218826/41647896-7b218ae0-74b2-11e8-90db-d7805cc23e8c.gif)
Expand Down Expand Up @@ -170,17 +170,17 @@ For more information on PR's steps, please see links in the Contributing section

## 📙 Documents

- [Getting Started](https://github.com/nhn/tui.image-editor/tree/master/docs/Basic-Tutorial.md)
- [Tutorial](https://github.com/nhn/tui.image-editor/tree/master/docs)
- [Getting Started](https://github.com/TheBrandwick/tui.image-editor/tree/master/docs/Basic-Tutorial.md)
- [Tutorial](https://github.com/TheBrandwick/tui.image-editor/tree/master/docs)
- [Example](http://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi)
- [API](http://nhn.github.io/tui.image-editor/latest)

## 💬 Contributing

- [Code of Conduct](https://github.com/nhn/tui.image-editor/blob/master/CODE_OF_CONDUCT.md)
- [Contributing guideline](https://github.com/nhn/tui.image-editor/blob/master/CONTRIBUTING.md)
- [Issue guideline](https://github.com/nhn/tui.image-editor/blob/master/ISSUE_TEMPLATE.md)
- [Commit convention](https://github.com/nhn/tui.image-editor/blob/production/docs/COMMIT_MESSAGE_CONVENTION.md)
- [Code of Conduct](https://github.com/TheBrandwick/tui.image-editor/blob/master/CODE_OF_CONDUCT.md)
- [Contributing guideline](https://github.com/TheBrandwick/tui.image-editor/blob/master/CONTRIBUTING.md)
- [Issue guideline](https://github.com/TheBrandwick/tui.image-editor/blob/master/ISSUE_TEMPLATE.md)
- [Commit convention](https://github.com/TheBrandwick/tui.image-editor/blob/production/docs/COMMIT_MESSAGE_CONVENTION.md)

## 🔩 Dependency

Expand All @@ -203,4 +203,4 @@ For more information on PR's steps, please see links in the Contributing section

## 📜 License

[MIT LICENSE](https://github.com/nhn/tui.image-editor/blob/master/LICENSE)
[MIT LICENSE](https://github.com/TheBrandwick/tui.image-editor/blob/master/LICENSE)
6 changes: 3 additions & 3 deletions apps/image-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ tui-image-editor/

### Download Source Files

- [Download bundle files from `dist` folder](https://github.com/nhn/tui.image-editor/tree/production/dist)
- [Download all sources for each version](https://github.com/nhn/tui.image-editor/releases)
- [Download bundle files from `dist` folder](https://github.com/TheBrandwick/tui.image-editor/tree/production/dist)
- [Download all sources for each version](https://github.com/TheBrandwick/tui.image-editor/releases)

## 🔨 Usage

Expand Down Expand Up @@ -169,7 +169,7 @@ const instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
1. **Use default svg built** into imageEditor without setting svg file path (Features added since version v3.9.0).
2. There is a way to use the **actual physical svg file** and **set the file location manually**.

Can find more details in [this document](https://github.com/nhn/tui.image-editor/blob/master/docs/Basic-Tutorial.md#4-menu-submenu-svg-icon-setting).
Can find more details in [this document](https://github.com/TheBrandwick/tui.image-editor/blob/master/docs/Basic-Tutorial.md#4-menu-submenu-svg-icon-setting).

### TypeScript

Expand Down
2 changes: 1 addition & 1 deletion apps/image-editor/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for TOAST UI Image Editor v3.15.2
// Type definitions for TOAST UI Image Editor v3.15.9
// TypeScript Version: 3.2.2

declare namespace tuiImageEditor {
Expand Down
4 changes: 3 additions & 1 deletion apps/image-editor/makesvg.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function getFileList(dir) {
const svg = fs.readFileSync(`${targetDir}/${file}`);
sprites.add(id, svg);
});
fs.writeFileSync(`./dist/svg/${dir}.svg`, sprites);
console.log({ dir });
console.log({ sprites });
fs.writeFileSync(`./dist/svg/${dir}.svg`, sprites.toString());
});
}

Expand Down
10 changes: 5 additions & 5 deletions apps/image-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tui-image-editor",
"version": "3.15.3",
"name": "@jaymanyoo/tui-image-editor",
"version": "3.15.9",
"description": "TOAST UI ImageEditor",
"keywords": [
"nhn",
Expand Down Expand Up @@ -32,12 +32,12 @@
"update:wrapper": "node scripts/updateWrapper.js",
"publish:cdn": "node scripts/publishToCDN.js"
},
"homepage": "https://github.com/nhn/tui.image-editor",
"bugs": "https://github.com/nhn/tui.image-editor/issues",
"homepage": "https://github.com/TheBrandwick/tui.image-editor",
"bugs": "https://github.com/TheBrandwick/tui.image-editor/issues",
"author": "NHN Cloud. FE Development Lab <dl_javascript@nhn.com>",
"repository": {
"type": "git",
"url": "https://github.com/nhn/tui.image-editor.git"
"url": "https://github.com/TheBrandwick/tui.image-editor.git"
},
"license": "MIT",
"browserslist": [
Expand Down
9 changes: 8 additions & 1 deletion apps/image-editor/src/js/interface/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ class Component {
* @returns {fabric.Image}
*/
getCanvasImage() {
return this.graphics.getCanvasImage();
const canvas = this.graphics.getCanvas();
const objects = canvas.getObjects();
let imageLayer = null;
imageLayer = objects[0];

return imageLayer;

// return this.graphics.getCanvasImage();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/image-editor/tuidoc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"title": {
"text": "repo",
"linkUrl": "https://github.com/nhn/tui.image-editor"
"linkUrl": "https://github.com/TheBrandwick/tui.image-editor"
}
},
"footer": [
Expand Down
2 changes: 1 addition & 1 deletion apps/react-image-editor/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TOAST UI Image Editor for React

> This is a React component wrapping [TOAST UI Image Editor](https://github.com/nhn/tui.image-editor).
> This is a React component wrapping [TOAST UI Image Editor](https://github.com/TheBrandwick/tui.image-editor).
[![npm version](https://img.shields.io/npm/v/@toast-ui/react-image-editor.svg)](https://www.npmjs.com/package/@toast-ui/react-image-editor)

Expand Down
19 changes: 11 additions & 8 deletions apps/react-image-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toast-ui/react-image-editor",
"version": "3.15.3",
"name": "@jaymanyoo/react-image-editor",
"version": "3.15.11",
"description": "TOAST UI Image-Editor for React",
"main": "dist/toastui-react-image-editor.js",
"files": [
Expand All @@ -12,10 +12,10 @@
"storybook": "start-storybook -s ./node_modules/tui-image-editor/dist/svg,.storybook -p 6006",
"build-storybook": "build-storybook"
},
"homepage": "https://github.com/nhn/tui.image-editor",
"bugs": "https://github.com/nhn/tui.image-editor/issues",
"homepage": "https://github.com/TheBrandwick/tui.image-editor",
"bugs": "https://github.com/TheBrandwick/tui.image-editor/issues",
"author": "NHN Cloud. FE Development Lab <dl_javascript@nhn.com>",
"repository": "https://github.com/nhn/tui.image-editor.git",
"repository": "https://github.com/TheBrandwick/tui.image-editor.git",
"license": "MIT",
"browserslist": [
"last 2 versions",
Expand All @@ -25,11 +25,14 @@
"react": "^17.0.2"
},
"devDependencies": {
"@webpack-cli/generators": "^3.0.7",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"fabric": "^4.2.0",
"tui-image-editor": "^3.15.2"
"@jaymanyoo/tui-image-editor": "^3.15.9",
"fabric": "^4.2.0"
}
}
3 changes: 2 additions & 1 deletion apps/react-image-editor/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import TuiImageEditor from 'tui-image-editor';
// import TuiImageEditor from 'tui-image-editor';
import TuiImageEditor from '@jaymanyoo/tui-image-editor';

export default class ImageEditor extends React.Component {
rootEl = React.createRef();
Expand Down
6 changes: 3 additions & 3 deletions apps/react-image-editor/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module.exports = () => ({
library: { type: 'commonjs2' },
},
externals: {
'tui-image-editor': {
commonjs: 'tui-image-editor',
commonjs2: 'tui-image-editor',
'@jaymanyoo/tui-image-editor': {
commonjs: '@jaymanyoo/tui-image-editor',
commonjs2: '@jaymanyoo/tui-image-editor',
},
react: {
commonjs: 'react',
Expand Down
2 changes: 1 addition & 1 deletion apps/vue-image-editor/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vue wrapper for TOAST UI Image Editor

> This is a Vue component wrapping [TOAST UI Image Editor](https://github.com/nhn/tui.image-editor).
> This is a Vue component wrapping [TOAST UI Image Editor](https://github.com/TheBrandwick/tui.image-editor).
[![npm version](https://img.shields.io/npm/v/@toast-ui/vue-image-editor.svg)](https://www.npmjs.com/package/@toast-ui/vue-image-editor)

Expand Down
6 changes: 3 additions & 3 deletions apps/vue-image-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"build": "webpack",
"storybook": "start-storybook -s .storybook -p 6006"
},
"homepage": "https://github.com/nhn/tui.image-editor",
"bugs": "https://github.com/nhn/tui.image-editor/issues",
"homepage": "https://github.com/TheBrandwick/tui.image-editor",
"bugs": "https://github.com/TheBrandwick/tui.image-editor/issues",
"author": "NHN Cloud. FE Development Lab <dl_javascript@nhn.com>",
"repository": "https://github.com/nhn/tui.image-editor.git",
"repository": "https://github.com/TheBrandwick/tui.image-editor.git",
"license": "MIT",
"browserslist": [
"last 2 versions",
Expand Down
Loading

0 comments on commit 3512dcd

Please sign in to comment.