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

Dimensions passed on URL don't work #320

Closed
sjernigan opened this issue Jan 24, 2019 · 5 comments
Closed

Dimensions passed on URL don't work #320

sjernigan opened this issue Jan 24, 2019 · 5 comments
Labels

Comments

@sjernigan
Copy link

The doc mentions that you can pass image dimensions on the URL like so
.../svg-editor.html?dimensions=300,240&canvas_expansion=5&initFill[color]=0000FF

However, when I try to do that with master or several hosted versions, I get a
TypeError: arr[Symbol.iterator] is not a function
error in the console. I could not find a workaround format.

I believe I understand the current status of this project so many thanks for any responses.

@sjernigan
Copy link
Author

Adding the below just above the call to config_.dimensions solves the issue for me but I may not understand the issue. I can submit a PR if desired.
if (config_.dimensions[Symbol.iterator] != 'function') { config_.dimensions = [config_.dimensions[0],config_.dimensions[1]] }

@brettz9
Copy link
Contributor

brettz9 commented Feb 21, 2019

Ok, there was one issue I've fixed just now in d7b9cc6 that array configs were not being preserved internally as arrays. You'll have to see though what other issues might still be present though as far as dimensions--e.g., updating the Document Properties dialog, etc.

@sjernigan
Copy link
Author

The changes seem to work. I have not noticed other issues though I only use dimensions, url, lang, and storagePrompt. Thank you.

@brettz9
Copy link
Contributor

brettz9 commented Mar 5, 2019

Are the dimensions to be reflected in the Document Properties dialog?

@sjernigan
Copy link
Author

Yes, they are correct in the Document Properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants