From 4079cca2317b8f28d74e279785e82f82a6621830 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Fri, 12 Apr 2019 22:39:53 +0200 Subject: [PATCH] v2.6.6 --- css/style.css | 7 ++++++- index.html | 2 +- index.php | 2 +- js/edit_sessions.js | 12 ++++++------ js/element.js | 2 +- js/web.js | 7 ++----- package.json | 2 +- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/css/style.css b/css/style.css index 7e5dfdfb8..a39a08b84 100644 --- a/css/style.css +++ b/css/style.css @@ -1785,9 +1785,11 @@ margin-top: -32px; position: relative; float: right; + pointer-events: none; } .panel .bar.next_to_title > .tool { float: right; + pointer-events: initial; } #uv_size .ui-resizable-se:before, #uv_size .ui-resizable-sw:before, @@ -1836,9 +1838,11 @@ color: var(--color-text); min-height: 81px; max-height: 320px; - overflow-y: scroll; padding: 5px; font-size: 12pt; + overflow-y: scroll; + overflow-x: hidden; + word-break: break-word; } #chat_history li { padding-top: 1px; @@ -1863,6 +1867,7 @@ opacity: 0.6; font-size: 0.8em; float: right; + clear: both; } #chat_bar { height: 32px; diff --git a/index.html b/index.html index 3f14fb333..5c52ce26c 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ diff --git a/index.php b/index.php index cf54eda42..957372cf1 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,7 @@ diff --git a/js/edit_sessions.js b/js/edit_sessions.js index f6551cb79..131df65aa 100644 --- a/js/edit_sessions.js +++ b/js/edit_sessions.js @@ -171,16 +171,16 @@ const EditSession = { sendAll: function(type, data) { var tag = {type, data} Blockbench.dispatchEvent('send_session_data', tag) - for (var id in EditSession.clients) { - var client = EditSession.clients[id]; - if (client != EditSession.self) { - client.send({ + for (var key in EditSession.peer.connections) { + var conns = EditSession.peer.connections[key]; + conns.forEach(conn => { + conn.send({ type: tag.type, fromHost: EditSession.hosting, sender: EditSession.peer.id, data: tag.data - }) - } + }); + }) } if (Blockbench.hasFlag('log_session')) { console.log('Sent Data:', type, data) diff --git a/js/element.js b/js/element.js index ff1e789f9..3289e3beb 100644 --- a/js/element.js +++ b/js/element.js @@ -1941,7 +1941,7 @@ function renameOutliner(element) { } else if (selected.length === 1 && !EditSession.active) { selected[0].rename() - } else if (selected.length) { + } else { if (selected_group && !element) { Blockbench.textPrompt(tl('message.rename_cubes'), selected_group.name, function (name) { diff --git a/js/web.js b/js/web.js index f485c608d..dad15cf3c 100644 --- a/js/web.js +++ b/js/web.js @@ -98,12 +98,11 @@ function saveFile() { window.onbeforeunload = function() { if (Prop.project_saved === false && elements.length > 0) { return true; + } else { + EditSession.quit() } } function showSaveDialog(close) { - function beforeClosing() { - EditSession.quit() - } var unsaved_textures = 0; textures.forEach(function(t) { if (!t.saved) { @@ -117,13 +116,11 @@ function showSaveDialog(close) { if (close) { //preventClosing = false } - beforeClosing() return true; } else { return false; } } else { - beforeClosing() return true; } } \ No newline at end of file diff --git a/package.json b/package.json index d65c1679c..9ef950d18 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Blockbench", "description": "Minecraft Block Model Editor", - "version": "2.6.5", + "version": "2.6.6", "license": "MIT", "author": { "name": "JannisX11",