Skip to content

Commit

Permalink
pallette pop down
Browse files Browse the repository at this point in the history
  • Loading branch information
SamarthBagga committed Apr 21, 2024
1 parent 075de81 commit 30ccffe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activities/DollarStreet.activity/js/palettes/incomes.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ define(['sugar-web/graphics/palette',"text!activity/palettes/incomes.html"], fun
that.getPalette().dispatchEvent(that.incomeEvent);
});

document.querySelector('#content').addEventListener('click', function(event){
that.popDown();
});

let wrapper = this.getPalette().childNodes[1];
wrapper.style.width = "450px";
wrapper.style.maxWidth = "400px";
Expand Down
4 changes: 4 additions & 0 deletions activities/DollarStreet.activity/js/palettes/regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ define(["sugar-web/graphics/palette"], function(palette) {
that.getPalette().firstChild.style.backgroundColor = "transparent";
that.getPalette().firstChild.style.backgroundImage = "";

document.querySelector('#content').addEventListener('click', function(event){
that.popDown();
});

function popDownOnButtonClick(event) {
console.log(event);
that.popDown();
Expand Down
4 changes: 4 additions & 0 deletions activities/DollarStreet.activity/js/palettes/things.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ define(["sugar-web/graphics/palette"], function(palette) {
that.getPalette().firstChild.style.backgroundColor = "transparent";
that.getPalette().firstChild.style.backgroundImage = "";

document.querySelector('#content').addEventListener('click', function(event){
that.popDown();
});

function popDownOnButtonClick(event) {
console.log(event);
that.popDown();
Expand Down

0 comments on commit 30ccffe

Please sign in to comment.