Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlling the data from parent-component/props #9

Closed
FerusAndBeyond opened this issue Nov 5, 2016 · 1 comment
Closed

Controlling the data from parent-component/props #9

FerusAndBeyond opened this issue Nov 5, 2016 · 1 comment
Milestone

Comments

@FerusAndBeyond
Copy link

FerusAndBeyond commented Nov 5, 2016

A nice feature would be to able to control the sketch-data from the parent-component/props. This way two persons can draw together by sharing and mutating external data for example.

Adding this to componentWillReceiveProps, could be a quick solution:

if(defaultData) {
            if ('json' === defaultDataType) {
                this.fromJSON(defaultData);
            }
            if ('url' === defaultDataType) {
                this.fromDataURL(defaultData);
            }
}

or maybe have another prop?

@tbolis tbolis added this to the v1.0.0 milestone Nov 9, 2016
@tbolis
Copy link
Owner

tbolis commented Nov 17, 2017

fixing this with version 4 onwards

@tbolis tbolis closed this as completed Nov 17, 2017
tbolis added a commit that referenced this issue Nov 17, 2017
fixes issues
- issue #9
- issue #10
- issue #15
tbolis added a commit that referenced this issue Nov 17, 2017
**0.4.0** New Features and fixes
    - Fixes
    -- Upgraded to latest packages (thanks @fjogeleit)
    -- Fix for undo/redo (thanks @pomelyu)
    -- Issue #9 fixed
    -- Issue #10 and #15 you can no longer give dataUrl as value only as background image and/or by adding the image as an object
    - Breaking Changes
    -- `data` and `dataType` properties have been replaced with `value` and `defaultValue`
    to be able to use the component as controlled component
    -- node support of 6,7 and 8
    - New Features
    -- ability to add an image as object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants