Skip to content

Commit 814a8b4

Browse files
committed
Merge pull request #269 from NativeScript/hdeshev/sidedrawer-templates-revert
Revert the hack for the side drawer component.
2 parents 3623f96 + 5268cb8 commit 814a8b4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

nativescript-angular/renderer.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,11 @@ export class NativeScriptRenderer extends Renderer {
113113

114114
attachViewAfter(anchorNode: NgView, viewRootNodes: NgView[]) {
115115
traceLog('NativeScriptRenderer.attachViewAfter: ' + anchorNode.nodeName + ' ' + anchorNode);
116-
//HACK: The anchor.templateParent precedence and child.templateParent
117-
//assignment are a workaround for RadSideDrawer.
118-
//Remove it once we ship the fix in the RadSideDrawer directives.
119-
const parent = (anchorNode.templateParent || <NgView>anchorNode.parent);
116+
const parent = (<NgView>anchorNode.parent || anchorNode.templateParent);
120117
const insertPosition = this.viewUtil.getChildIndex(parent, anchorNode);
121118

122119
viewRootNodes.forEach((node, index) => {
123120
const childIndex = insertPosition + index + 1;
124-
//Remember the template parent in case someone moves the view element
125-
//before Angular attaches the next view.
126-
node.templateParent = parent;
127121
this.viewUtil.insertChild(parent, node, childIndex);
128122
this.animateNodeEnter(node);
129123
});

0 commit comments

Comments
 (0)