fix(projection): allow more bound render elements than app elements.
Fixes #3236 Closes #3247
This commit is contained in:
@ -307,6 +307,10 @@ export class RenderProtoViewMergeMapping {
|
||||
// Mappings of nested ProtoViews are in depth first order, with all
|
||||
// indices for one ProtoView in a consecuitve block.
|
||||
public mappedElementIndices: number[],
|
||||
// Number of bound render element.
|
||||
// Note: This could be more than the original ones
|
||||
// as we might have bound a new element for projecting bound text nodes.
|
||||
public mappedElementCount: number,
|
||||
// Mapping from app text index to render text index.
|
||||
// Mappings of nested ProtoViews are in depth first order, with all
|
||||
// indices for one ProtoView in a consecuitve block.
|
||||
|
@ -56,9 +56,10 @@ export function mergeProtoViewsRecursively(protoViewRefs: List<RenderProtoViewRe
|
||||
var mergedProtoView =
|
||||
DomProtoView.create(mainProtoView.original.type, rootElement, fragmentsRootNodeCount,
|
||||
rootTextNodeIndices, mergedElementBinders);
|
||||
return new RenderProtoViewMergeMapping(
|
||||
new DomProtoViewRef(mergedProtoView), fragmentsRootNodeCount.length, mappedElementIndices,
|
||||
mappedTextIndices, hostElementIndicesByViewIndex, nestedViewCounts);
|
||||
return new RenderProtoViewMergeMapping(new DomProtoViewRef(mergedProtoView),
|
||||
fragmentsRootNodeCount.length, mappedElementIndices,
|
||||
mergedBoundElements.length, mappedTextIndices,
|
||||
hostElementIndicesByViewIndex, nestedViewCounts);
|
||||
}
|
||||
|
||||
function cloneProtoViews(protoViewRefs: List<RenderProtoViewRef | List<any>>,
|
||||
|
Reference in New Issue
Block a user