diff options
author | James Westman <james@jwestman.net> | 2022-10-04 16:09:06 -0500 |
---|---|---|
committer | James Westman <james@jwestman.net> | 2022-10-05 21:30:19 -0500 |
commit | 03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6 (patch) | |
tree | d14320e239460b6e9cbbfc5b7f42bb95f140e4cf /src/zoomInDialog.js | |
parent | 0282bc30f2b78d5e4c3a19f970740886fbc5ed15 (diff) | |
download | gnome-maps-03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6.tar.gz |
Use object destructuring in constructors
Diffstat (limited to 'src/zoomInDialog.js')
-rw-r--r-- | src/zoomInDialog.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/zoomInDialog.js b/src/zoomInDialog.js index 89eb07d1..351d1fe8 100644 --- a/src/zoomInDialog.js +++ b/src/zoomInDialog.js @@ -27,18 +27,9 @@ import {OSMEdit} from './osmEdit.js'; export class ZoomInDialog extends Gtk.Dialog { - constructor(params) { - let latitude = params.latitude; - delete params.latitude; - let longitude = params.longitude; - delete params.longitude; - let map = params.map; - delete params.map; - - /* This is a construct-only property and cannot be set by GtkBuilder */ - params.use_header_bar = true; - - super(params); + constructor({latitude, longitude, map, ...params}) { + /* use_header_bar is a construct-only property and cannot be set by GtkBuilder */ + super({...params, use_header_bar: true}); this._latitude = latitude; this._longitude = longitude; |