Fix trigger button

This commit is contained in:
OVSharova 2021-12-09 04:10:01 +03:00
parent 39d99bc762
commit 859f2174e6
3 changed files with 29 additions and 41 deletions

View file

@ -190,11 +190,8 @@ define([
onTriggerClick: function (value) {
if(this.api) {
if(value==this.view.triggers.ClickSequence)
{
this._state.Trigger = this.view.triggers.ClickSequence;
this._state.TriggerValue = true;
this.AnimationProperties.asc_putTriggerClickSequence(this._state.TriggerValue);
if(value.value == this.view.triggers.ClickSequence) {
this.AnimationProperties.asc_putTriggerClickSequence(true);
this.api.asc_SetAnimationProperties(this.AnimationProperties);
}
}
@ -202,15 +199,11 @@ define([
onTriggerClickOfClick: function (value)
{
if(this.api)
{
// this._state.Trigger = this.view.triggers.ClickOf;
// this._state.TriggerValue = value.caption;
if(this.api) {
this.AnimationProperties.asc_putTriggerClickSequence(false);
this.AnimationProperties.asc_putTriggerObjectClick(value.caption);
this.api.asc_SetAnimationProperties(this.AnimationProperties);
}
},
onEffectSelect: function (combo, record) {

View file

@ -215,7 +215,6 @@
<span id="animation-spin-duration" class="btn-slot text spinner" ></span>
</div>
<div class="elset font-normal">
<label id="animation-label-trigger"></label>
<div class="btn-slot" style="width: 82px;" id="animation-trigger"></div>
</div>
</div>

View file

@ -263,12 +263,11 @@ define([
this.cmbTrigger = new Common.UI.Button({
parentEl: $('#animation-trigger'),
cls: 'btn-text-split-default',
split: true,
width: 82,
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-contents',
caption: this.strTrigger,
lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.noTriggerObjects],
menu : new Common.UI.Menu({
style : 'min-width: 150px;',
items: [
{
caption: this.textOnClickSequence,
@ -286,8 +285,8 @@ define([
}]
}),
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintDirection: 'left',
dataHintOffset: 'medium'
});
this.lockedControls.push(this.cmbTrigger);
this.btnClickOf = this.cmbTrigger.menu.items[1];
@ -350,7 +349,6 @@ define([
this.$el.find('#animation-delay').text(this.strDelay);
this.$el.find('#animation-label-start').text(this.strStart);
this.$el.find('#animation-repeat').text(this.strRepeat);
this.$el.find('#animation-label-trigger').text(this.strTrigger);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
@ -417,14 +415,12 @@ define([
this.btnAnimationPane && this.btnAnimationPane.render(this.$el.find('#animation-button-pane'));
this.btnAddAnimation && this.btnAddAnimation.render(this.$el.find('#animation-button-add-effect'));
this.cmbStart && this.cmbStart.render(this.$el.find('#animation-start'));
//this.cmbTrigger && this.cmbTrigger.render(this.$el.find('#animation-trigger'));
this.renderComponent('#animation-spin-duration', this.numDuration);
this.renderComponent('#animation-spin-delay', this.numDelay);
this.renderComponent('#animation-spin-repeat', this.numRepeat);
this.$el.find("#animation-duration").innerText = this.strDuration;
this.$el.find("#animation-delay").innerText = this.strDelay;
this.$el.find("#animation-label-start").innerText = this.strStart;
this.$el.find("#animation-label-trigger").innerText = this.strTrigger;
this.$el.find("#animation-repeat").innerText = this.strRepeat;
return this.$el;
},