Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop edit mode when leaving edit component #3927

Merged
merged 2 commits into from
May 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions contribs/gmf/src/editing/editFeatureSelectorComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ exports.component_ = function() {
};


exports.directive('gmfEditfeatureselector',
exports.component_);
exports.directive('gmfEditfeatureselector', exports.component_);


/**
Expand All @@ -80,8 +79,7 @@ exports.directive('gmfEditfeatureselector',
* @ngdoc controller
* @ngname GmfEditfeatureselectorController
*/
exports.Controller_ = function($scope, $timeout, gmfThemes,
gmfTreeManager) {
exports.Controller_ = function($scope, $timeout, gmfThemes, gmfTreeManager) {

// === Directive options ===

Expand Down Expand Up @@ -254,7 +252,7 @@ exports.Controller_.prototype.stopEditing = function() {
exports.Controller_.prototype.handleActiveChange_ = function(active) {
if (!active) {
if (!this.dirty) {
this.selectedEditableNode = null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectedEditableNode variable is not defined (or used) !

this.stopEditing();
} else {
// There are unsaved modifications. Prevent the deactivation and
// set the state accordingly for the `gmf-editfeature` directive
Expand All @@ -278,8 +276,7 @@ exports.Controller_.prototype.handleDestroy_ = function() {
};


exports.controller('GmfEditfeatureselectorController',
exports.Controller_);
exports.controller('GmfEditfeatureselectorController', exports.Controller_);


export default exports;