| 922 | } |
| 923 | |
| 924 | public unbind(property: string): void { |
| 925 | const bindings = this.bindings; |
| 926 | if (!bindings) { |
| 927 | return; |
| 928 | } |
| 929 | |
| 930 | const binding = bindings.get(property); |
| 931 | if (binding) { |
| 932 | binding.unbind(); |
| 933 | bindings.delete(property); |
| 934 | if (binding.sourceIsBindingContext) { |
| 935 | if (property === 'bindingContext') { |
| 936 | this.shouldAddHandlerToParentBindingContextChanged = false; |
| 937 | this.bindingContextBoundToParentBindingContextChanged = false; |
| 938 | const parent = this.parent; |
| 939 | if (parent) { |
| 940 | parent.off('bindingContextChange', this.bindingContextChanged, this); |
| 941 | } |
| 942 | } |
| 943 | } |
| 944 | } |
| 945 | } |
| 946 | |
| 947 | private performLayout(currentRun = 0) { |
| 948 | // if there's an animation in progress we need to delay the layout |