mirror of https://github.com/apache/nifi.git
NIFI-510:
- Only reacting to window resize events when the target of the event is the window.
This commit is contained in:
parent
cd845c08f2
commit
df5755514c
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue