mirror of
https://github.com/apache/nifi.git
synced 2025-02-09 03:25:04 +00:00
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
|
// 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;
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user