mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 07:21:02 -04:00
[#181] use 'regular' listeners for the maximiser icons, left a note for future reference
This commit is contained in:
parent
5916251893
commit
7fff6f51dc
3 changed files with 17 additions and 9 deletions
|
@ -141,7 +141,16 @@ class Manager {
|
||||||
document.getElementById("load-button").addEventListener("click", this.controls.loadButtonClick.bind(this.controls));
|
document.getElementById("load-button").addEventListener("click", this.controls.loadButtonClick.bind(this.controls));
|
||||||
document.getElementById("support").addEventListener("click", this.controls.supportButtonClick.bind(this.controls));
|
document.getElementById("support").addEventListener("click", this.controls.supportButtonClick.bind(this.controls));
|
||||||
this.addMultiEventListeners("#save-texts textarea", "keyup paste", this.controls.saveTextChange, this.controls);
|
this.addMultiEventListeners("#save-texts textarea", "keyup paste", this.controls.saveTextChange, this.controls);
|
||||||
this.addDynamicListener(".btn-maximise", "click", this.controls.handlePaneMaximising, this.controls);
|
/**
|
||||||
|
* A note for the Controls listeners below:
|
||||||
|
*
|
||||||
|
* I would strongly prefer to just add one listener to all elements with the .btn-maximise class,
|
||||||
|
* but for a reason I have not been able to uncover ( something to do with addDynamicListener? ) click events
|
||||||
|
* don't properly bubble and the hitbox to maximise is unacceptably tiny
|
||||||
|
*/
|
||||||
|
document.getElementById("maximise-recipe").addEventListener("click", this.controls.handlePaneMaximising.bind(this.controls))
|
||||||
|
document.getElementById("maximise-input").addEventListener("click", this.controls.handlePaneMaximising.bind(this.controls))
|
||||||
|
document.getElementById("maximise-output").addEventListener("click", this.controls.handlePaneMaximising.bind(this.controls))
|
||||||
|
|
||||||
// Operations
|
// Operations
|
||||||
this.addMultiEventListener("#search", "keyup paste search click", this.ops.searchOperations, this.ops);
|
this.addMultiEventListener("#search", "keyup paste search click", this.ops.searchOperations, this.ops);
|
||||||
|
@ -291,7 +300,7 @@ class Manager {
|
||||||
* @param {Object} [scope=this] - The object to bind to the callback function
|
* @param {Object} [scope=this] - The object to bind to the callback function
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Calls the save function whenever the the keyup or paste events are triggered on any element
|
* // Calls the save function whenever the keyup or paste events are triggered on any element
|
||||||
* // with the .saveable class
|
* // with the .saveable class
|
||||||
* this.addMultiEventListener(".saveable", "keyup paste", this.save, this);
|
* this.addMultiEventListener(".saveable", "keyup paste", this.save, this);
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
- view-heights not correct due to variable taskbar on mobile devices
|
- view-heights not correct due to variable taskbar on mobile devices
|
||||||
|
|
||||||
- need long press checks on mobile to add favourites and switch ingredient order
|
- need long press checks on mobile to add favourites and switch ingredient order
|
||||||
- fix "hitbox" ( event bubbling ) for maximiser icon / button
|
|
||||||
|
|
||||||
### Desktop UI:
|
### Desktop UI:
|
||||||
### General UI:
|
### General UI:
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#banner { height: var(--banner-height); }
|
||||||
|
#operations { height: var(--operations-height); }
|
||||||
|
#recipe { height: var(--recipe-height); }
|
||||||
|
#IO { height: var(--io-height); }
|
||||||
|
#controls { height: var(--controls-height); }
|
||||||
|
|
||||||
#banner,
|
#banner,
|
||||||
#content-wrapper {
|
#content-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -23,12 +29,6 @@
|
||||||
margin-top: var(--banner-height);
|
margin-top: var(--banner-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
#banner { height: var(--banner-height); }
|
|
||||||
#operations { height: var(--operations-height); }
|
|
||||||
#recipe { height: var(--recipe-height); }
|
|
||||||
#IO { height: var(--io-height); }
|
|
||||||
#controls { height: var(--controls-height); }
|
|
||||||
|
|
||||||
#controls {
|
#controls {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue