From 44549a406c1b77a3871dc879210cfdbcccd16ce8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 26 Jan 2017 12:47:33 +0100 Subject: [PATCH] CodeListView trigger display event --- src/ui/CodeListView.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/CodeListView.js b/src/ui/CodeListView.js index 3dc8fe0022..e7d5933745 100644 --- a/src/ui/CodeListView.js +++ b/src/ui/CodeListView.js @@ -3,8 +3,10 @@ var style = require('./styles/basicStyles') var yo = require('yo-yo') var ui = require('../helpers/ui') var DropdownPanel = require('./DropdownPanel') +var EventManager = require('../lib/eventManager') function CodeListView (_parent, _codeManager) { + this.event = new EventManager() this.parent = _parent this.codeManager = _codeManager this.code @@ -12,6 +14,12 @@ function CodeListView (_parent, _codeManager) { this.codeView this.itemSelected this.basicPanel = new DropdownPanel('Instructions', {json: false}) + this.basicPanel.event.register('hide', () => { + this.event.trigger('hide', []) + }) + this.basicPanel.event.register('show', () => { + this.event.trigger('show', []) + }) this.init() }