Commit 723a6059 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

поправлены баги с позицией на draw и setPosition

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55178 954022d7-b5bf-4e40-9824-e11837661b57
parent e84742a1
...@@ -52,7 +52,7 @@ function CMathBase() ...@@ -52,7 +52,7 @@ function CMathBase()
} }
CMathBase.prototype = CMathBase.prototype =
{ {
setContent: function(bColl) setContent: function()
{ {
this.elements = new Array(); this.elements = new Array();
...@@ -61,7 +61,7 @@ CMathBase.prototype = ...@@ -61,7 +61,7 @@ CMathBase.prototype =
this.elements[i] = new Array(); this.elements[i] = new Array();
for(var j = 0; j < this.nCol; j++) for(var j = 0; j < this.nCol; j++)
{ {
this.elements[i][j] = new CMathContent(bColl); this.elements[i][j] = new CMathContent();
this.elements[i][j].relate(this); this.elements[i][j].relate(this);
this.elements[i][j].setComposition(this.Composition); this.elements[i][j].setComposition(this.Composition);
/*if( !this.elements[i][j].IsJustDraw()) /*if( !this.elements[i][j].IsJustDraw())
......
...@@ -7,7 +7,7 @@ function CFraction() ...@@ -7,7 +7,7 @@ function CFraction()
CMathBase.call(this); CMathBase.call(this);
} }
extend(CFraction, CMathBase); extend(CFraction, CMathBase);
CFraction.prototype.init = function(props, bColl) CFraction.prototype.init = function(props)
{ {
var bValid = typeof(props.type) !== "undefined" && props.type !== null; var bValid = typeof(props.type) !== "undefined" && props.type !== null;
...@@ -24,10 +24,10 @@ CFraction.prototype.init = function(props, bColl) ...@@ -24,10 +24,10 @@ CFraction.prototype.init = function(props, bColl)
if(this.type == BAR_FRACTION || this.type == NO_BAR_FRACTION) if(this.type == BAR_FRACTION || this.type == NO_BAR_FRACTION)
{ {
var num = new CNumerator(); var num = new CNumerator();
num.init(bColl); num.init();
var den = new CDenominator(); var den = new CDenominator();
den.init(bColl); den.init();
this.setDimension(2, 1); this.setDimension(2, 1);
...@@ -440,10 +440,10 @@ function CNumerator() ...@@ -440,10 +440,10 @@ function CNumerator()
CMathBase.call(this); CMathBase.call(this);
} }
extend(CNumerator, CMathBase); extend(CNumerator, CMathBase);
CNumerator.prototype.init = function(bColl) CNumerator.prototype.init = function()
{ {
this.setDimension(1, 1); this.setDimension(1, 1);
this.setContent(bColl); this.setContent();
} }
CNumerator.prototype.recalculateSize = function() CNumerator.prototype.recalculateSize = function()
{ {
...@@ -505,10 +505,10 @@ function CDenominator() ...@@ -505,10 +505,10 @@ function CDenominator()
CMathBase.call(this); CMathBase.call(this);
} }
extend(CDenominator, CMathBase); extend(CDenominator, CMathBase);
CDenominator.prototype.init = function(bColl) CDenominator.prototype.init = function()
{ {
this.setDimension(1, 1); this.setDimension(1, 1);
this.setContent(bColl); this.setContent();
} }
CDenominator.prototype.recalculateSize = function() CDenominator.prototype.recalculateSize = function()
{ {
......
...@@ -358,14 +358,8 @@ CMPrp.prototype = ...@@ -358,14 +358,8 @@ CMPrp.prototype =
// 1. (!!) повтор IsIncline, IsHighElement // 1. (!!) повтор IsIncline, IsHighElement
function CMathContent(bCollaborative) function CMathContent()
{ {
if (!bCollaborative)
{
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.m_aPairs[this.Id] = this;
}
this.bDot = false; this.bDot = false;
this.plhHide = false; this.plhHide = false;
this.bRoot = false; this.bRoot = false;
...@@ -689,9 +683,9 @@ CMathContent.prototype = ...@@ -689,9 +683,9 @@ CMathContent.prototype =
var element = new mathElem(obj); var element = new mathElem(obj);
//obj.relate(this); //obj.relate(this);
obj.Parent = this; obj.Parent = this;
if(obj.typeObj === MATH_COMP) if(obj.typeObj === MATH_COMP)
obj.setComposition(this.Composition); obj.setComposition(this.Composition);
this.content.push(element); this.content.push(element);
this.CurPos++; this.CurPos++;
...@@ -728,6 +722,7 @@ CMathContent.prototype = ...@@ -728,6 +722,7 @@ CMathContent.prototype =
this.CurPos++; this.CurPos++;
this.setLogicalPosition(this.CurPos); this.setLogicalPosition(this.CurPos);
//this.setStart_Selection(this.CurPos); //this.setStart_Selection(this.CurPos);
//this.selection.active = false; //this.selection.active = false;
}, },
...@@ -5346,7 +5341,7 @@ CMathContent.prototype = ...@@ -5346,7 +5341,7 @@ CMathContent.prototype =
if( !bHidePlh ) if( !bHidePlh )
{ {
for(var i=1; i < this.content.length;i++) for(var i=0; i < this.content.length;i++)
{ {
if(this.content[i].value.typeObj == MATH_RUN_PRP) if(this.content[i].value.typeObj == MATH_RUN_PRP)
{ {
...@@ -7557,7 +7552,7 @@ CMathContent.prototype = ...@@ -7557,7 +7552,7 @@ CMathContent.prototype =
} }
function CMathComposition(bCollaborative) function CMathComposition()
{ {
this.Parent = undefined; this.Parent = undefined;
...@@ -7590,7 +7585,7 @@ function CMathComposition(bCollaborative) ...@@ -7590,7 +7585,7 @@ function CMathComposition(bCollaborative)
this.DEFAULT_RUN_PRP = new CMathRunPrp(); this.DEFAULT_RUN_PRP = new CMathRunPrp();
this.Init(bCollaborative); this.Init();
} }
CMathComposition.prototype = CMathComposition.prototype =
{ {
...@@ -8211,9 +8206,9 @@ CMathComposition.prototype = ...@@ -8211,9 +8206,9 @@ CMathComposition.prototype =
},*/ },*/
//////////////* end of test functions *////////////////// //////////////* end of test functions *//////////////////
Init: function(bCollaborative) Init: function()
{ {
this.Root = new CMathContent(bCollaborative); this.Root = new CMathContent();
//this.Root.gaps = gps; //this.Root.gaps = gps;
this.Root.setComposition(this); this.Root.setComposition(this);
//this.SetTestRunPrp(); //this.SetTestRunPrp();
......
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