Commit dd0ffbff authored by 李维's avatar 李维

修复选择器画图时背景不消失的问题

parent f63617dd
...@@ -116,6 +116,10 @@ export default class DrawingBoard extends cc.Component { ...@@ -116,6 +116,10 @@ export default class DrawingBoard extends cc.Component {
{ 'resName': 'color_black', 'color': '#000000' } { 'resName': 'color_black', 'color': '#000000' }
]; ];
const paletteBtn = cc.find("ToolBox/Palette", this.node)
const btnColors = cc.find("ToolBox/Palette/btnColors", this.node)
const bgPalette = cc.find("ToolBox/Palette/bgPalette", this.node)
const eraserBtn = cc.find("ToolBox/Eraser", this.node) const eraserBtn = cc.find("ToolBox/Eraser", this.node)
const eraserIconNormal = cc.find("normal", eraserBtn) const eraserIconNormal = cc.find("normal", eraserBtn)
const eraserIconActive = cc.find("active", eraserBtn) const eraserIconActive = cc.find("active", eraserBtn)
...@@ -178,9 +182,6 @@ export default class DrawingBoard extends cc.Component { ...@@ -178,9 +182,6 @@ export default class DrawingBoard extends cc.Component {
this.node.emit("onPaintingEnd"); this.node.emit("onPaintingEnd");
}) })
const paletteBtn = cc.find("ToolBox/Palette", this.node)
const btnColors = cc.find("ToolBox/Palette/btnColors", this.node)
const bgPalette = cc.find("ToolBox/Palette/bgPalette", this.node)
paletteBtn.on("click", ()=>{ paletteBtn.on("click", ()=>{
this.openPalette = !this.openPalette; this.openPalette = !this.openPalette;
btnColors.active = this.openPalette; btnColors.active = this.openPalette;
...@@ -224,8 +225,10 @@ export default class DrawingBoard extends cc.Component { ...@@ -224,8 +225,10 @@ export default class DrawingBoard extends cc.Component {
// 如果调色板开打状态 则关闭 // 如果调色板开打状态 则关闭
if(this.openPalette) { if(this.openPalette) {
const bgPalette = cc.find("ToolBox/Palette/bgPalette", this.node)
const btnColors = cc.find("ToolBox/Palette/btnColors", this.node) const btnColors = cc.find("ToolBox/Palette/btnColors", this.node)
this.openPalette = false; this.openPalette = false;
bgPalette.active = false;
btnColors.active = false; btnColors.active = false;
} }
......
...@@ -79,7 +79,7 @@ cc.Class({ ...@@ -79,7 +79,7 @@ cc.Class({
this.posYHide = -deviceSize.height / 2 - this.node.height / 2 - 50; this.posYHide = -deviceSize.height / 2 - this.node.height / 2 - 50;
this.node.x = 0 this.node.x = 0
this.node.y = this.posYShow; this.node.y = this.posYHide;
this.setProgress(0); this.setProgress(0);
}, },
......
...@@ -106,12 +106,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -106,12 +106,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initMiddleLayer(); // 中间层相关 this.initMiddleLayer(); // 中间层相关
this.initEventListener(); // 事件监听 this.initEventListener(); // 事件监听
this.initHeaderAndFooter(); // 顶部和底部图片 this.initHeaderAndFooter(); // 顶部和底部图片
this.initVideoPlayerLayer(); // 视频播放层
await this.initHotZoneBg(); // 初始化背景 await this.initHotZoneBg(); // 初始化背景
this.initHotZoneItem(); // 初始化热区数据 this.initHotZoneItem(); // 初始化热区数据
this.initScorePanel(); this.initScorePanel();
this.initActionButton(); this.initActionButton();
this.initScoreShow(); this.initScoreShow();
this.initVideoPlayerLayer(); // 视频播放层
this.enableScroll(); // 启用页面滚动 this.enableScroll(); // 启用页面滚动
this.startTimestamp = new Date().getTime(); this.startTimestamp = new Date().getTime();
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<nz-select [(ngModel)]="it.hotZoneType" style="width: 300px;" (ngModelChange)="save()"> <nz-select [(ngModel)]="it.hotZoneType" style="width: 300px;" (ngModelChange)="save()">
<nz-option [nzValue]="TEXT_SELECT" nzLabel="文字选项"></nz-option> <nz-option [nzValue]="TEXT_SELECT" nzLabel="文字选项"></nz-option>
<nz-option [nzValue]="AUDIO_PLAY" nzLabel="播放音频"></nz-option> <nz-option [nzValue]="AUDIO_PLAY" nzLabel="播放音频"></nz-option>
<nz-option [nzValue]="VIDEO_PLAY" nzLabel="播放视频(开发中)"></nz-option> <nz-option [nzValue]="VIDEO_PLAY" nzLabel="播放视频"></nz-option>
<nz-option [nzValue]="HOT_ZONE_RADIO" nzLabel="热区选项(单选)"></nz-option> <nz-option [nzValue]="HOT_ZONE_RADIO" nzLabel="热区选项(单选)"></nz-option>
<nz-option [nzValue]="HOT_ZONE_CHECKBOX" nzLabel="热区选项(多选)"></nz-option> <nz-option [nzValue]="HOT_ZONE_CHECKBOX" nzLabel="热区选项(多选)"></nz-option>
<nz-option [nzValue]="TEXTINPUT" nzLabel="文字输入"></nz-option> <nz-option [nzValue]="TEXTINPUT" nzLabel="文字输入"></nz-option>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<nz-option [nzValue]="PRONUNCIATION_ASSESSMENT" nzLabel="语音评测"></nz-option> <nz-option [nzValue]="PRONUNCIATION_ASSESSMENT" nzLabel="语音评测"></nz-option>
<nz-option [nzValue]="CONNECTION_CHOICE" nzLabel="连线选择题"></nz-option> <nz-option [nzValue]="CONNECTION_CHOICE" nzLabel="连线选择题"></nz-option>
<nz-option [nzValue]="TEXTINPUT_GROUP" nzLabel="文字输入组"></nz-option> <nz-option [nzValue]="TEXTINPUT_GROUP" nzLabel="文字输入组"></nz-option>
<nz-option [nzValue]="DRAWING" nzLabel="涂色题(开发中)"></nz-option> <nz-option [nzValue]="DRAWING" nzLabel="涂色题"></nz-option>
<nz-option [nzValue]="IMAGE_SELECT" nzLabel="图片选项" nzDisabled></nz-option> <nz-option [nzValue]="IMAGE_SELECT" nzLabel="图片选项" nzDisabled></nz-option>
</nz-select> </nz-select>
<label *ngIf="it.hotZoneType == TEXT_SELECT" nz-checkbox [(ngModel)]="it.useSelectOptionList" (ngModelChange)="handleUserSelectOptionListChange(it)" style="margin-left: 10px;">使用独立选项清单</label> <label *ngIf="it.hotZoneType == TEXT_SELECT" nz-checkbox [(ngModel)]="it.useSelectOptionList" (ngModelChange)="handleUserSelectOptionListChange(it)" style="margin-left: 10px;">使用独立选项清单</label>
......
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