mirror of
https://github.com/hydra-synth/hydra.git
synced 2025-12-17 20:29:58 +01:00
updated editor styling
This commit is contained in:
@@ -43862,6 +43862,7 @@ function showConfirmation(successCallback, terminateCallback) {
|
||||
const html = require('choo/html')
|
||||
const Component = require('choo/component')
|
||||
const HydraEditor = require('./editor/editor.js')
|
||||
const log = require('./editor/log.js')
|
||||
|
||||
module.exports = class Editor extends Component {
|
||||
constructor (id, state, emit) {
|
||||
@@ -43872,6 +43873,7 @@ module.exports = class Editor extends Component {
|
||||
}
|
||||
|
||||
load (element) {
|
||||
log.init(this.logElement)
|
||||
this.editor = new HydraEditor(this.textEl)
|
||||
this.editor.on("*", (e, args) => {
|
||||
this.emit(e, args)
|
||||
@@ -43900,13 +43902,15 @@ module.exports = class Editor extends Component {
|
||||
|
||||
createElement ({ width = window.innerWidth, height = window.innerHeight} = {}) {
|
||||
this.textEl = html` <textarea></textarea>`
|
||||
return html`<div id="editor-container">
|
||||
${this.textEl}
|
||||
this.logElement = html`<div class="console cm-s-tomorrow-night-eighties"></div>`
|
||||
return html`<div id="editor-container" style="display:flex;flex-direction:column;">
|
||||
<div style="position:relative;flex:auto;padding:15px">${this.textEl}</div>
|
||||
${this.logElement}
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
|
||||
},{"./editor/editor.js":231,"choo/component":31,"choo/html":32}],230:[function(require,module,exports){
|
||||
},{"./editor/editor.js":231,"./editor/log.js":233,"choo/component":31,"choo/html":32}],230:[function(require,module,exports){
|
||||
const html = require('choo/html')
|
||||
const Component = require('choo/component')
|
||||
const HydraSynth = require('hydra-synth')
|
||||
@@ -44137,12 +44141,14 @@ module.exports = {
|
||||
var logElement
|
||||
|
||||
module.exports = {
|
||||
init: () => {
|
||||
logElement = document.createElement('div')
|
||||
logElement.className = "console cm-s-tomorrow-night-eighties"
|
||||
document.body.appendChild(logElement)
|
||||
init: (el) => {
|
||||
// logElement = document.createElement('div')
|
||||
// logElement.className = "console cm-s-tomorrow-night-eighties"
|
||||
// document.body.appendChild(logElement)
|
||||
logElement = el
|
||||
},
|
||||
log: (msg, className = "") => {
|
||||
console.log('logging', msg, className)
|
||||
if(logElement) logElement.innerHTML =` >> <span class=${className}> ${msg} </span> `
|
||||
},
|
||||
hide: () => {
|
||||
|
||||
Reference in New Issue
Block a user