Commit 4e095b71 authored by SergeyLuzyanin's avatar SergeyLuzyanin

getMatchingShape

parent 63348556
......@@ -1160,26 +1160,29 @@ CShape.prototype.isGroup = function () {
return false;
};
CShape.prototype.getHierarchy = function () {
//if (this.recalcInfo.recalculateShapeHierarchy)
CShape.prototype.getHierarchy = function()
{
//if(this.recalcInfo.recalculateShapeHierarchy)
{
this.compiledHierarchy = [];
var hierarchy = this.compiledHierarchy;
if (this.parent && this.isPlaceholder()) {
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind) {
var b_is_single_body = this.getIsSingleBody && this.getIsSingleBody();
switch (this.parent.kind)
{
case AscFormat.TYPE_KIND.SLIDE:
{
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index, b_is_single_body));
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index, b_is_single_body));
break;
}
case AscFormat.TYPE_KIND.LAYOUT:
case AscFormat.TYPE_KIND.NOTES:
{
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index, b_is_single_body));
break;
}
}
......@@ -1189,6 +1192,7 @@ CShape.prototype.getHierarchy = function () {
return this.compiledHierarchy;
};
CShape.prototype.getPaddings = function () {
var paddings = null;
var shape = this;
......
......@@ -753,7 +753,8 @@ CShape.prototype.getIsSingleBody = function(x, y)
{
if(!this.isPlaceholder())
return false;
if(this.getPlaceholderType() !== AscFormat.phType_body)
var ph_type = this.getPlaceholderType();
if(this.getPlaceholderType() !== AscFormat.phType_body && ph_type !== null)
return false;
if(this.parent && this.parent.cSld && Array.isArray(this.parent.cSld.spTree))
{
......
......@@ -459,7 +459,7 @@ Slide.prototype =
}
}
if(body_count === 1 && type === AscFormat.phType_body && bSingleBody)
if(body_count === 1 && _input_reduced_type === AscFormat.phType_body && bSingleBody)
{
return last_body;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment