forked from projects/fipamo
edit format bar always stays on screen
This commit is contained in:
parent
8684c8b1ac
commit
b69559541a
3 changed files with 18 additions and 25 deletions
|
@ -5,7 +5,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=adsfdfdf">
|
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=dafdfa">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block mainContent %}
|
{% block mainContent %}
|
||||||
|
|
|
@ -140,9 +140,9 @@
|
||||||
this[globalName] = mainExports;
|
this[globalName] = mainExports;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})({"jRsG2":[function(require,module,exports) {
|
})({"hFE32":[function(require,module,exports) {
|
||||||
var HMR_HOST = null;
|
var HMR_HOST = null;
|
||||||
var HMR_PORT = 1234;
|
var HMR_PORT = 54262;
|
||||||
var HMR_SECURE = false;
|
var HMR_SECURE = false;
|
||||||
var HMR_ENV_HASH = "4a236f9275d0a351";
|
var HMR_ENV_HASH = "4a236f9275d0a351";
|
||||||
module.bundle.HMR_BUNDLE_ID = "770375bf412ba982";
|
module.bundle.HMR_BUNDLE_ID = "770375bf412ba982";
|
||||||
|
@ -1959,21 +1959,16 @@ class TextEditor extends _eventEmitterDefault.default {
|
||||||
result_element.scrollLeft = e.scrollLeft;
|
result_element.scrollLeft = e.scrollLeft;
|
||||||
});
|
});
|
||||||
document.getElementById("edit").dispatchEvent(new Event("input"));
|
document.getElementById("edit").dispatchEvent(new Event("input"));
|
||||||
this.setInputs();
|
this.setInputs(); //freeze editor formatting so it doesn't scroll off screen
|
||||||
window.addEventListener("scroll", ()=>{
|
window.addEventListener("scroll", ()=>{
|
||||||
/**
|
var fixLimit = scrollLimit;
|
||||||
* edit scroller needs work
|
if (window.pageYOffset + 5 >= fixLimit) document.getElementById("edit-control").style.position = "fixed";
|
||||||
if (window.pageYOffset >= fixLimit) {
|
else document.getElementById("edit-control").style.position = "relative";
|
||||||
document.getElementById('edit-control').style.position = 'fixed';
|
});
|
||||||
} else {
|
|
||||||
document.getElementById('edit-control').style.position = 'relative';
|
|
||||||
}
|
|
||||||
*/ }); //this.refresh();
|
|
||||||
}
|
}
|
||||||
// methods
|
// methods
|
||||||
//--------------------------
|
//--------------------------
|
||||||
setInputs() {
|
setInputs() {
|
||||||
let self = this;
|
|
||||||
var editorButtons = document.querySelectorAll(".editor-button");
|
var editorButtons = document.querySelectorAll(".editor-button");
|
||||||
for(var i = 0, length = editorButtons.length; i < length; i++)editorButtons[i].addEventListener("click", (e)=>this.handleEditorOption(e)
|
for(var i = 0, length = editorButtons.length; i < length; i++)editorButtons[i].addEventListener("click", (e)=>this.handleEditorOption(e)
|
||||||
, false);
|
, false);
|
||||||
|
@ -8358,6 +8353,6 @@ Sortable.mount(new AutoScrollPlugin());
|
||||||
Sortable.mount(Remove, Revert);
|
Sortable.mount(Remove, Revert);
|
||||||
exports.default = Sortable;
|
exports.default = Sortable;
|
||||||
|
|
||||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV"}]},["jRsG2","bEyX8"], "bEyX8", "parcelRequiredac0")
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"ciiiV"}]},["hFE32","bEyX8"], "bEyX8", "parcelRequiredac0")
|
||||||
|
|
||||||
//# sourceMappingURL=Start.js.map
|
//# sourceMappingURL=Start.js.map
|
||||||
|
|
|
@ -41,24 +41,22 @@ class TextEditor extends EventEmitter {
|
||||||
});
|
});
|
||||||
document.getElementById("edit").dispatchEvent(new Event("input"));
|
document.getElementById("edit").dispatchEvent(new Event("input"));
|
||||||
this.setInputs();
|
this.setInputs();
|
||||||
|
|
||||||
|
//freeze editor formatting so it doesn't scroll off screen
|
||||||
window.addEventListener("scroll", () => {
|
window.addEventListener("scroll", () => {
|
||||||
//var fixLimit = this.fixLimit;
|
var fixLimit = scrollLimit;
|
||||||
/**
|
|
||||||
* edit scroller needs work
|
if (window.pageYOffset + 5 >= fixLimit) {
|
||||||
if (window.pageYOffset >= fixLimit) {
|
document.getElementById("edit-control").style.position = "fixed";
|
||||||
document.getElementById('edit-control').style.position = 'fixed';
|
} else {
|
||||||
} else {
|
document.getElementById("edit-control").style.position = "relative";
|
||||||
document.getElementById('edit-control').style.position = 'relative';
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
//this.refresh();
|
|
||||||
}
|
}
|
||||||
//--------------------------
|
//--------------------------
|
||||||
// methods
|
// methods
|
||||||
//--------------------------
|
//--------------------------
|
||||||
setInputs() {
|
setInputs() {
|
||||||
let self = this;
|
|
||||||
var editorButtons = document.querySelectorAll(".editor-button");
|
var editorButtons = document.querySelectorAll(".editor-button");
|
||||||
for (var i = 0, length = editorButtons.length; i < length; i++) {
|
for (var i = 0, length = editorButtons.length; i < length; i++) {
|
||||||
editorButtons[i].addEventListener(
|
editorButtons[i].addEventListener(
|
||||||
|
|
Loading…
Reference in a new issue