NIFI-510:

- Only reacting to window resize events when the target of the event is the window.
This commit is contained in:
Matt Gilman 2015-04-10 14:48:01 -04:00
parent cd845c08f2
commit df5755514c
2 changed files with 14 additions and 7 deletions

View File

@ -529,9 +529,11 @@ nf.Canvas = (function () {
}; };
// listen for browser resize events to reset the graph size // listen for browser resize events to reset the graph size
$(window).on('resize', function () { $(window).on('resize', function (e) {
updateGraphSize(); if (e.target === window) {
nf.Settings.resetTableSize(); updateGraphSize();
nf.Settings.resetTableSize();
}
}).on('keydown', function (evt) { }).on('keydown', function (evt) {
var isCtrl = evt.ctrlKey || evt.metaKey; var isCtrl = evt.ctrlKey || evt.metaKey;

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* global Slick */
$(document).ready(function () { $(document).ready(function () {
ua.editable = $('#attribute-updater-editable').text() === 'true'; ua.editable = $('#attribute-updater-editable').text() === 'true';
ua.init(); ua.init();
@ -43,10 +46,12 @@ var ua = {
var actionsGrid = ua.initActionsGrid(); var actionsGrid = ua.initActionsGrid();
// enable grid resizing // enable grid resizing
$(window).resize(function () { $(window).resize(function (e) {
conditionsGrid.resizeCanvas(); if (e.target === window) {
actionsGrid.resizeCanvas(); conditionsGrid.resizeCanvas();
ua.resizeSelectedRuleNameField(); actionsGrid.resizeCanvas();
ua.resizeSelectedRuleNameField();
}
}); });
// initialize the rule list // initialize the rule list