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
$(window).on('resize', function () {
updateGraphSize();
nf.Settings.resetTableSize();
$(window).on('resize', function (e) {
if (e.target === window) {
updateGraphSize();
nf.Settings.resetTableSize();
}
}).on('keydown', function (evt) {
var isCtrl = evt.ctrlKey || evt.metaKey;

View File

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