ngOfficeUIFabric / ng-officeuifabric

Office UI Fabric (https://github.com/OfficeDev/office-ui-fabric) implementation for Angular
http://ngOfficeUiFabric.com
MIT License
321 stars 67 forks source link

panel directive uif-is-open link is not working correctly #373

Closed RG1337 closed 7 years ago

RG1337 commented 8 years ago

the panel directive is broken in some situations.

Let's say you have a minimal app, here you can open the panel using the open button. The problem occurs if you press the open button while the panel is still closing. The variable vm.isOpen is set to true but the panel will not reopen.

<div ng-app="myApp" ng-controller="myController">
  <uif-button  ng-click="vm.isOpen = true">open</uif-button>
  <uif-panel uif-type="small" uif-is-open="vm.isOpen" uif-show-overlay="true" uif-show-close="true">
    <uif-panel-header>Header</uif-panel-header>
    <uif-content>
      <span class="ms-font-m">Place your content in here!</span>
    </uif-content>
  </uif-panel>
</div>
andrewconnell commented 8 years ago

As the issue template indicated when you created the issue, could you reproduce it with a plunkr or something? Easier to see what's going on and see if it's a bug / feature request.

RG1337 commented 8 years ago

Here is a jsfiddle:

https://jsfiddle.net/owv9fw4f/

if you press the open button during the closing animation the panel will no longer open if you click on open.

ghost commented 8 years ago

Thanks for the jsfiddle @RG1337

I have just been able to repro this, you have to be very quick with pressing the button - but it certainly happens! Feel free to assign to me @andrewconnell

RG1337 commented 8 years ago

@tobiaswest83 The problem is that once the isOpen value is true the 'watch' will no longer trigger in the 'panelDirective`. This is standard angular behavior afaik. There needs to be a way to stop an animation and run the other if the value is changed during the animation.

andrewconnell commented 7 years ago

Hey @tobiaswest83, I know been a long time since we had this opened, but do you still want to tackle it?

ghost commented 7 years ago

I'll tackle this still, sorry for confusing things!