Skip to content

Add openAtDepth function + minor fixes #34

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

Merged
merged 6 commits into from
Oct 14, 2016
Merged

Add openAtDepth function + minor fixes #34

merged 6 commits into from
Oct 14, 2016

Conversation

PaulBernier
Copy link
Contributor

Redo of #32

* `animateOpen`: enable animation when expanding json object. True by default.
* `animateClose`: enable animation when closing json object. True by default.

##### Theme
* `theme`: a string that can be any of these options: `['dark']`. Look at [`src/style.less`](src/style.less) for making new themes.
#### `openAtDepth([depth])`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an example for this?

something like:

const f = new Formatter({ ... });
document.body.appendChild(f.render())
f.openAtDepth(2)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an example to the README

@mohsen1
Copy link
Owner

mohsen1 commented Oct 12, 2016

You can push to this branch, you don't have to create new pull requests.

@mohsen1 mohsen1 merged commit e5ab17b into mohsen1:master Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants