main
Isaiah Odhner 2019-09-21 12:35:27 -04:00
parent 71887dff92
commit 00e25455d0
3 changed files with 4 additions and 6 deletions

View File

@ -141,7 +141,7 @@ OnCanvasSelection.prototype.cut_out_background = function(){
// NOTE: must come before cutout canvas is modified
var colored_cutout = new Canvas(cutout);
replace_colors_with_swatch(colored_cutout.ctx, colors.background, sel.x, sel.y);
var colored_cutout_image_data = colored_cutout.ctx.getImageData(0, 0, sel.width, sel.height);
// var colored_cutout_image_data = colored_cutout.ctx.getImageData(0, 0, sel.width, sel.height);
// }
for(var i=0; i<cutoutImageData.data.length; i+=4){

View File

@ -654,9 +654,9 @@ function getSelectionText() {
var activeEl = document.activeElement;
var activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null;
if (
(activeElTagName == "textarea") || (activeElTagName == "input" &&
/^(?:text|search|password|tel|url)$/i.test(activeEl.type)) &&
(typeof activeEl.selectionStart == "number")
(activeElTagName == "textarea") || (activeElTagName == "input" &&
/^(?:text|search|password|tel|url)$/i.test(activeEl.type)) &&
(typeof activeEl.selectionStart == "number")
) {
text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd);
} else if (window.getSelection) {

View File

@ -1,6 +1,4 @@
var is_electron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1;
var menus = {
"&File": [
{