Commit 379f7d14 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47849 954022d7-b5bf-4e40-9824-e11837661b57
parent 1bb3bbc9
......@@ -260,10 +260,6 @@ function CEditorPage(api)
this.Init = function()
{
//-
InitPanelAnimation();
//-
this.m_oBody = CreateControlContainer(this.Name);
this.m_oBody.HtmlElement.style.backgroundColor = "#D3D3D3";
......@@ -2601,8 +2597,6 @@ function CEditorPage(api)
drDoc.SlideCurrent = lPageNum;
this.m_oLogicDocument.Set_CurPage(lPageNum);
this.m_oApi.asc_fireCallback("asc_onSlideTiming", this.m_oLogicDocument.Slides[lPageNum].timing);
// теперь пошлем все шаблоны первой темы
this.CheckLayouts();
......
......@@ -2806,734 +2806,3 @@ function CDemonstrationManager(htmlpage)
{
}
}
\ No newline at end of file
////////////////////////////////////////////////////////////////////
var _global_lock_params_timing = false;
function InitPanelAnimation()
{
var _body_elem = document.body;
var _div_caption = document.createElement('div');
_div_caption.id = "animationPropDrag";
_div_caption.setAttribute("style", "display:block;width:200px;background-color:#fff;top:57px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;cursor:move;");
_div_caption.innerHTML = "<div id=\"animationPropDragCaption\" style=\"float:left;width:200px;text-align: center;\">\
<b>Timing</b>\
</div>";
var _div_animation_prop = document.createElement('div');
_div_animation_prop.id = "animationProp";
_div_animation_prop.setAttribute("style", "display:display;width:200px;background-color:#fff;top:87px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;");
_div_animation_prop.innerHTML = "<div style=\"float:left;padding-left:5px;width:200px\">\
<div style=\"float:left;width:190px;text-align: center;\">Transition</div>\
<select id=\"animationType\" style=\"width:180px;\" onchange=\"AnimationType_Changed()\">\
<option value=\"0\">None</option>\
<option value=\"1\">Fade</option>\
<option value=\"2\">Push</option>\
<option value=\"3\">Wipe</option>\
<option value=\"4\">Split</option>\
<option value=\"5\">UnCover</option>\
<option value=\"6\">Cover</option>\
<option value=\"7\">Clock</option>\
<option value=\"9\">Zoom</option>\
</select>\
<select id=\"animationParam\" style=\"width:180px;\" onchange=\"AnimationParam_Changed()\">\
</select>\
Time <input id=\"animationSpeed\" style=\"width:70px;\" value=\"2.0\" onchange=\"AnimationSpeed_Changed()\"/>\
<input id=\"animationPlay\" style=\"width:60px;\" type=\"button\" value=\"Play\"/>\
<div style=\"float:left;width:190px;text-align: center;\">__________________</div>\
<div style=\"margin-top:10px;margin-bottom:10px;float:left;width:190px;text-align: center;\">Advance Slide</div>\
<br/>\
<input id=\"box_tr1\" type=\"checkbox\" onchange=\"SA_Check_Box_OnMouseClick()\"/> On Mouse Click\
<br/>\
<input id=\"box_tr2\" style=\"margin-top:10px;\" type=\"checkbox\" onchange=\"SA_Check_Box_After()\"/> After: \
<input id=\"slideDuration\" style=\"width:60px;margin-top:10px;\" value=\"10.0\" onchange=\"SlideDuration_Changed()\">\
<input id=\"slideApplyToAll\" style=\"width:170px;margin-top:10px;margin-bottom:10px;\" type=\"button\" value=\"Apply To All\"/>\
<div>";
Drag.init( _div_caption, null, null, null, null, null, true );
_div_caption.onDrag = function(X, Y)
{
var sTop = Y + 30 + "px", sRight = X + "px";
_div_animation_prop.style.top = sTop;
_div_animation_prop.style.right = sRight;
};
_body_elem.appendChild(_div_caption);
_body_elem.appendChild(_div_animation_prop);
document.getElementById("animationPlay").onclick = AnimationPlay;
document.getElementById("slideApplyToAll").onclick = TimingApplyToAll;
$("#animationSpeed")
.focus(function(){editor.asc_enableKeyEvents(false);})
.blur(function(){editor.asc_enableKeyEvents(true);});
$("#slideDuration")
.focus(function(){editor.asc_enableKeyEvents(false);})
.blur(function(){editor.asc_enableKeyEvents(true);});
$("#id_viewer")["mousedown"](function(){ this.focus(); editor.asc_enableKeyEvents(true);});
}
window["AnimationType_Changed"] = function()
{
var _type = document.getElementById("animationType").selectedIndex;
var _elem = document.getElementById("animationParam");
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.TransitionType = _type;
editor.ApplySlideTiming(_timing);
}
if (!bIsIE)
{
switch (_type)
{
case c_oAscSlideTransitionTypes.None:
{
_elem.innerHTML = "";
break;
}
case c_oAscSlideTransitionTypes.Fade:
{
_elem.innerHTML = "<option value=\"0\">Smoothly</option><option value=\"1\">Through Black</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Push:
{
_elem.innerHTML = "<option value=\"0\">Bottom</option>\
<option value=\"1\">Left</option>\
<option value=\"2\">Right</option>\
<option value=\"3\">Top</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Wipe:
{
_elem.innerHTML = "<option value=\"0\">Right</option>\
<option value=\"2\">Top</option>\
<option value=\"3\">Left</option>\
<option value=\"4\">Bottom</option>\
<option value=\"5\">Top-Right</option>\
<option value=\"6\">Bottom-Right</option>\
<option value=\"7\">Top-Left</option>\
<option value=\"8\">Bottom-Left</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Split:
{
_elem.innerHTML = "<option value=\"0\">Vertical Out</option>\
<option value=\"1\">Horizontal In</option>\
<option value=\"2\">Horizontal Out</option>\
<option value=\"3\">Vertical In</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.UnCover:
{
_elem.innerHTML = "<option value=\"0\">Right</option>\
<option value=\"1\">Top</option>\
<option value=\"2\">Left</option>\
<option value=\"3\">Bottom</option>\
<option value=\"4\">Top-Right</option>\
<option value=\"5\">Bottom-Right</option>\
<option value=\"6\">Top-Left</option>\
<option value=\"7\">Bottom-Left</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Cover:
{
_elem.innerHTML = "<option value=\"0\">Right</option>\
<option value=\"1\">Top</option>\
<option value=\"2\">Left</option>\
<option value=\"3\">Bottom</option>\
<option value=\"4\">Top-Right</option>\
<option value=\"5\">Bottom-Right</option>\
<option value=\"6\">Top-Left</option>\
<option value=\"7\">Bottom-Left</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Clock:
{
_elem.innerHTML = "<option value=\"0\">Clockwise</option>\
<option value=\"1\">Counterclockwise</option>\
<option value=\"2\">Wedge</option>";
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Zoom:
{
_elem.innerHTML = "<option value=\"0\">In</option>\
<option value=\"1\">Out</option>\
<option value=\"2\">Zoom and Rotate</option>";
_elem.selectedIndex = 0;
break;
}
default:
break;
}
}
else
{
_elem.innerHTML = "";
switch (_type)
{
case c_oAscSlideTransitionTypes.None:
{
break;
}
case c_oAscSlideTransitionTypes.Fade:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Smoothly";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 1;opt2.innerHTML = "Through Black";_elem.appendChild(opt2);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Push:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Bottom";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Left";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Right";_elem.appendChild(opt3);
var opt4 = document.createElement("option");opt4.value= 4;opt4.innerHTML = "Top";_elem.appendChild(opt4);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Wipe:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Right";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Top";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Left";_elem.appendChild(opt3);
var opt4 = document.createElement("option");opt4.value= 4;opt4.innerHTML = "Bottom";_elem.appendChild(opt4);
var opt5 = document.createElement("option");opt5.value= 0;opt5.innerHTML = "Top-Right";_elem.appendChild(opt5);
var opt6 = document.createElement("option");opt6.value= 2;opt6.innerHTML = "Bottom-Right";_elem.appendChild(opt6);
var opt7 = document.createElement("option");opt7.value= 3;opt7.innerHTML = "Top-Left";_elem.appendChild(opt7);
var opt8 = document.createElement("option");opt8.value= 4;opt8.innerHTML = "Bottom-Left";_elem.appendChild(opt8);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Split:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Vertical Out";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Horizontal In";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Horizontal Out";_elem.appendChild(opt3);
var opt4 = document.createElement("option");opt4.value= 4;opt4.innerHTML = "Vertical In";_elem.appendChild(opt4);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.UnCover:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Right";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Top";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Left";_elem.appendChild(opt3);
var opt4 = document.createElement("option");opt4.value= 4;opt4.innerHTML = "Bottom";_elem.appendChild(opt4);
var opt5 = document.createElement("option");opt5.value= 0;opt5.innerHTML = "Top-Right";_elem.appendChild(opt5);
var opt6 = document.createElement("option");opt6.value= 2;opt6.innerHTML = "Bottom-Right";_elem.appendChild(opt6);
var opt7 = document.createElement("option");opt7.value= 3;opt7.innerHTML = "Top-Left";_elem.appendChild(opt7);
var opt8 = document.createElement("option");opt8.value= 4;opt8.innerHTML = "Bottom-Left";_elem.appendChild(opt8);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Cover:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Right";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Top";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Left";_elem.appendChild(opt3);
var opt4 = document.createElement("option");opt4.value= 4;opt4.innerHTML = "Bottom";_elem.appendChild(opt4);
var opt5 = document.createElement("option");opt5.value= 0;opt5.innerHTML = "Top-Right";_elem.appendChild(opt5);
var opt6 = document.createElement("option");opt6.value= 2;opt6.innerHTML = "Bottom-Right";_elem.appendChild(opt6);
var opt7 = document.createElement("option");opt7.value= 3;opt7.innerHTML = "Top-Left";_elem.appendChild(opt7);
var opt8 = document.createElement("option");opt8.value= 4;opt8.innerHTML = "Bottom-Left";_elem.appendChild(opt8);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Clock:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "Clockwise";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Counterclockwise";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Wedge";_elem.appendChild(opt3);
_elem.selectedIndex = 0;
break;
}
case c_oAscSlideTransitionTypes.Zoom:
{
var opt1 = document.createElement("option");opt1.value= 0;opt1.innerHTML = "In";_elem.appendChild(opt1);
var opt2 = document.createElement("option");opt2.value= 2;opt2.innerHTML = "Out";_elem.appendChild(opt2);
var opt3 = document.createElement("option");opt3.value= 3;opt3.innerHTML = "Zoom and Rotate";_elem.appendChild(opt3);
_elem.selectedIndex = 0;
break;
}
default:
break;
}
}
AnimationParam_Changed();
}
window["AnimationParam_Changed"] = function()
{
var _type = document.getElementById("animationType").selectedIndex;
var _elem = document.getElementById("animationParam").selectedIndex;
var _array_Params = [
[],
[c_oAscSlideTransitionParams.Fade_Smoothly, c_oAscSlideTransitionParams.Fade_Through_Black],
[c_oAscSlideTransitionParams.Param_Bottom, c_oAscSlideTransitionParams.Param_Left, c_oAscSlideTransitionParams.Param_Right, c_oAscSlideTransitionParams.Param_Top],
[c_oAscSlideTransitionParams.Param_Right, c_oAscSlideTransitionParams.Param_Top, c_oAscSlideTransitionParams.Param_Left, c_oAscSlideTransitionParams.Param_Bottom, c_oAscSlideTransitionParams.Param_TopRight, c_oAscSlideTransitionParams.Param_BottomRight, c_oAscSlideTransitionParams.Param_TopLeft, c_oAscSlideTransitionParams.Param_BottomLeft],
[c_oAscSlideTransitionParams.Split_VerticalOut, c_oAscSlideTransitionParams.Split_HorizontalIn, c_oAscSlideTransitionParams.Split_HorizontalOut, c_oAscSlideTransitionParams.Split_VerticalIn],
[c_oAscSlideTransitionParams.Param_Right, c_oAscSlideTransitionParams.Param_Top, c_oAscSlideTransitionParams.Param_Left, c_oAscSlideTransitionParams.Param_Bottom, c_oAscSlideTransitionParams.Param_TopRight, c_oAscSlideTransitionParams.Param_BottomRight, c_oAscSlideTransitionParams.Param_TopLeft, c_oAscSlideTransitionParams.Param_BottomLeft],
[c_oAscSlideTransitionParams.Param_Right, c_oAscSlideTransitionParams.Param_Top, c_oAscSlideTransitionParams.Param_Left, c_oAscSlideTransitionParams.Param_Bottom, c_oAscSlideTransitionParams.Param_TopRight, c_oAscSlideTransitionParams.Param_BottomRight, c_oAscSlideTransitionParams.Param_TopLeft, c_oAscSlideTransitionParams.Param_BottomLeft],
[c_oAscSlideTransitionParams.Clock_Clockwise, c_oAscSlideTransitionParams.Clock_Counterclockwise, c_oAscSlideTransitionParams.Clock_Wedge],
[c_oAscSlideTransitionParams.Zoom_In, c_oAscSlideTransitionParams.Zoom_Out, c_oAscSlideTransitionParams.Zoom_AndRotate]
];
var _param = _array_Params[_type][_elem];
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.TransitionOption = _param;
editor.ApplySlideTiming(_timing);
}
}
window["SA_Check_Box_After"] = function()
{
var _is_ = document.getElementById("box_tr2").checked;
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.SlideAdvanceAfter = _is_;
editor.ApplySlideTiming(_timing);
}
}
window["SA_Check_Box_OnMouseClick"] = function()
{
var _is_ = document.getElementById("box_tr1").checked;
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.SlideAdvanceOnMouseClick = _is_;
editor.ApplySlideTiming(_timing);
}
}
window["SlideDuration_Changed"] = function()
{
var duration = (parseFloat(document.getElementById("slideDuration").value) * 1000) >> 0;
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.SlideAdvanceDuration = duration;
editor.ApplySlideTiming(_timing);
}
}
window["AnimationSpeed_Changed"] = function()
{
var duration = (parseFloat(document.getElementById("animationSpeed").value) * 1000) >> 0;
if (!_global_lock_params_timing)
{
var _timing = new CAscSlideTiming();
_timing.setUndefinedOptions();
_timing.TransitionDuration = duration;
editor.ApplySlideTiming(_timing);
}
}
function AnimationPlay()
{
editor.SlideTransitionPlay();
}
function TimingApplyToAll()
{
editor.SlideTimingApplyToAll();
}
function UnInitPanelAnimation()
{
var _1 = document.getElementById('animationPropDrag');
var _2 = document.getElementById('animationProp');
if (_1 && _2)
{
var _body_elem = document.body;
_body_elem.removeChild(_1);
_body_elem.removeChild(_2);
}
}
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown = Drag.start;
o.hmode = bSwapHorzRef ? false : true ;
o.vmode = bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "350px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX = typeof minX != 'undefined' ? minX : null;
o.minY = typeof minY != 'undefined' ? minY : null;
o.maxX = typeof maxX != 'undefined' ? maxX : null;
o.maxY = typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
if (o.hmode) {
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper) nx = o.xMapper(y)
else if (o.yMapper) ny = o.yMapper(x)
if(o.hmode)
{
Drag.obj.root.style.left = nx + "px";
}
else
{
Drag.obj.root.style.right = nx + "px";
}
if(o.vmode)
{
Drag.obj.root.style.top = ny + "px";
}
else
{
Drag.obj.root.style.bottom = ny + "px";
}
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
var x_pos = parseInt( Drag.obj.hmode ? Drag.obj.root.style.left : Drag.obj.root.style.right );
var y_pos = parseInt( Drag.obj.vmode ? Drag.obj.root.style.top : Drag.obj.root.style.bottom );
Drag.obj.root.onDragEnd( x_pos, y_pos );
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
function SlideTimingCallback(_timing)
{
var _elem = document.getElementById("animationType");
if (!_elem)
return;
_global_lock_params_timing = true;
document.getElementById("animationType").selectedIndex = _timing.TransitionType;
AnimationType_Changed();
switch (_timing.TransitionType)
{
case c_oAscSlideTransitionTypes.Fade:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Fade_Smoothly:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Fade_Through_Black:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
default:
break;
}
break;
}
case c_oAscSlideTransitionTypes.Push:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Param_Bottom:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Param_Left:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
case c_oAscSlideTransitionParams.Param_Right:
{
document.getElementById("animationParam").selectedIndex = 2;
break;
}
case c_oAscSlideTransitionParams.Param_Top:
{
document.getElementById("animationParam").selectedIndex = 3;
break;
}
default:
break;
}
break;
}
case c_oAscSlideTransitionTypes.Wipe:
case c_oAscSlideTransitionTypes.UnCover:
case c_oAscSlideTransitionTypes.Cover:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Param_Right:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Param_Top:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
case c_oAscSlideTransitionParams.Param_Left:
{
document.getElementById("animationParam").selectedIndex = 2;
break;
}
case c_oAscSlideTransitionParams.Param_Bottom:
{
document.getElementById("animationParam").selectedIndex = 3;
break;
}
case c_oAscSlideTransitionParams.Param_TopRight:
{
document.getElementById("animationParam").selectedIndex = 4;
break;
}
case c_oAscSlideTransitionParams.Param_BottomRight:
{
document.getElementById("animationParam").selectedIndex = 5;
break;
}
case c_oAscSlideTransitionParams.Param_TopLeft:
{
document.getElementById("animationParam").selectedIndex = 6;
break;
}
case c_oAscSlideTransitionParams.Param_BottomLeft:
{
document.getElementById("animationParam").selectedIndex = 7;
break;
}
default:
break;
}
break;
}
case c_oAscSlideTransitionTypes.Split:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Split_VerticalOut:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Split_HorizontalIn:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
case c_oAscSlideTransitionParams.Split_HorizontalOut:
{
document.getElementById("animationParam").selectedIndex = 2;
break;
}
case c_oAscSlideTransitionParams.Split_VerticalIn:
{
document.getElementById("animationParam").selectedIndex = 3;
break;
}
default:
break;
}
break;
}
case c_oAscSlideTransitionTypes.Clock:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Clock_Clockwise:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Clock_Counterclockwise:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
case c_oAscSlideTransitionParams.Clock_Wedge:
{
document.getElementById("animationParam").selectedIndex = 2;
break;
}
default:
break;
}
break;
}
case c_oAscSlideTransitionTypes.Zoom:
{
switch (_timing.TransitionOption)
{
case c_oAscSlideTransitionParams.Zoom_In:
{
document.getElementById("animationParam").selectedIndex = 0;
break;
}
case c_oAscSlideTransitionParams.Zoom_Out:
{
document.getElementById("animationParam").selectedIndex = 1;
break;
}
case c_oAscSlideTransitionParams.Zoom_AndRotate:
{
document.getElementById("animationParam").selectedIndex = 2;
break;
}
default:
break;
}
break;
}
default:
break;
}
AnimationParam_Changed();
document.getElementById("animationSpeed").value = "" + (_timing.TransitionDuration / 1000);
document.getElementById("box_tr1").checked = (true === _timing.SlideAdvanceOnMouseClick);
document.getElementById("box_tr2").checked = (true === _timing.SlideAdvanceAfter);
document.getElementById("slideDuration").value = "" + (_timing.SlideAdvanceDuration / 1000);
_global_lock_params_timing = false;
}
var _global_slide_timing_timer_ = setInterval(function() {
if (window.editor)
{
editor.asc_registerCallback("asc_onSlideTiming", function(){
SlideTimingCallback(arguments[0]);
});
clearInterval(_global_slide_timing_timer_);
}
}, 1000);
////////////////////////////////////////////////////////////////////
\ No newline at end of file
......@@ -1483,6 +1483,8 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
var arr_ind = this.WordControl.Thumbnails.GetSelectedArray();
var _back_fill = prop.get_background();
if (_back_fill)
{
if (_back_fill.get_type() == c_oAscFill.FILL_TYPE_NOFILL)
{
this.WordControl.m_oLogicDocument.changeBackground(null, arr_ind);
......@@ -1548,6 +1550,13 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
}
}
var _timing = prop.get_timing();
if (_timing)
{
this.ApplySlideTiming(_timing);
}
}
asc_docs_api.prototype.put_LineCap = function(_cap)
......@@ -3314,6 +3323,8 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide)
}
}
obj.Timing = slide.timing;
var _len = this.SelectedObjectsStack.length;
if (_len > 0)
{
......
......@@ -505,10 +505,13 @@ function CorrectUniFill(asc_fill, unifill)
function CAscSlideProps()
{
this.Background = null;
this.Timing = null;
}
CAscSlideProps.prototype.get_background = function(){return this.Background;}
CAscSlideProps.prototype.put_background = function(v){this.Background = v;}
CAscSlideProps.prototype.get_timing = function(){return this.Timing;}
CAscSlideProps.prototype.put_timing = function(v){this.Timing = v;}
// ---------------------------------------------------------------
......
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