You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Support multiple menus with different state
* Remove console log
* Fix initial state and cleanup
* Remove burger-menu service and keep state contained per menu
* Fix tests + update readme
* Use native dom helpers
* Use state actions to handle all open and close requests
This allows us to contain the `locked` logic to the state object
* Cleanup
* Update readme
Copy file name to clipboardExpand all lines: README.md
+3-33Lines changed: 3 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ An off-canvas sidebar component with a collection of animations and styles using
13
13
14
14
- Easy to use & setup off-canvas menu
15
15
- Mix and match from many menu & menu item animations
16
-
- Control your menu from anywhere in your app
17
16
- Swipe gesture support with changeable thresholds
18
17
- Easily create your own animations
19
18
@@ -123,8 +122,7 @@ This addon utilizes contextual components to be able to correctly control and an
123
122
124
123
-#### `locked`
125
124
126
-
Lock the menu in its current open / closed state. Please note that changes made
127
-
directly via the burgerMenu service or {{burger.state.actions}} will still propagate.
125
+
Lock the menu in its current open / closed state.
128
126
129
127
**Default: false**
130
128
@@ -214,29 +212,7 @@ The individual menu item. This is required if you have specified an [itemAnimati
214
212
215
213
## The Menu State
216
214
217
-
### Via Component
218
-
219
-
The `{{burger-menu}}` component exposes multiple contextual components, but it also exposes a state object which allows you to control the state of the menu.
220
-
221
-
```hbs
222
-
{{#burger-menu as |burger|}}
223
-
{{#burger.outlet}}
224
-
<a {{action burger.state.actions.toggle}} class="close fa fa-times"></a>
225
-
{{/burger.outlet}}
226
-
{{/burger-menu}}
227
-
```
228
-
229
-
### Via Service
230
-
231
-
If you need a more programmatic solution, you can grab the menu state via injecting the `burgerMenu` service.
232
-
233
-
```js
234
-
exportdefaultEmber.Component.extend({
235
-
burgerMenu:Ember.inject.service()
236
-
})
237
-
```
238
-
239
-
### Usage
215
+
The `{{burger-menu}}` component exposes multiple contextual components, but it also exposes a state object.
240
216
241
217
You can use the menu state object to modify pretty much any property.
242
218
@@ -247,13 +223,7 @@ You can use the menu state object to modify pretty much any property.
0 commit comments