Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

issue 960, 772, 946 ChildModel, clonedModel #961

Merged
merged 6 commits into from
Dec 4, 2014

Conversation

nmccready
Copy link
Contributor

@aesnyder
@zacronos
Commits deal with 2 issues

  1. Google Chrome Painting which appears to have been caused by changes originally made by 772 fixes.
  2. Model Changes via reference and by value (cloned). Cloned for comparisons to do dirty checks to figure out updates. The reference is for the front end controllers to be able to make changes and then have them reflected back to the directive.

@@ -21,7 +21,7 @@
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,800,600,300,700'
rel='stylesheet' type='text/css'>
<link href="//rawgit.com/angular-ui/angular-google-maps/master/example/assets/stylesheets/example.css" rel="stylesheet" type="text/css">
<link href="./assets/stylesheets/example.css" rel="stylesheet" type="text/css">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if these urls will work for the (website) demo.. lets find out

- This is ripe for a ChildBase Class
This makes angular-ui#946 and angular-ui#772 compatible
@@ -2413,6 +2413,7 @@ Nicholas McCready - https://twitter.com/nmccready
this.defaults = defaults;
this.model = model;
this.clean = __bind(this.clean, this);
this.clonedModel = _.clone(this.model, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cthrax since you just looked at his code recently. Remember the _.clone stuff being passed in? Well it is ideal to have clones for comparison. However it sucks when we pass the models back to the Controllers (through behaviors and functions). IE if we don't pass reference back to the Controller the user can't make changes in the model to be reflected back to the directive. This is why #772 broke and how this keeps #946 happy.

@nmccready nmccready changed the title issue 960 issue 960, 772, 946 ChildModel, clonedModel Dec 4, 2014
@@ -22,7 +22,7 @@ angular.module('uiGmapgoogle-maps.directives.api.utils')

wrapped.promise

onlyTheLast = (->
onlyTheLast = do ->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

clarity

Copy link

Choose a reason for hiding this comment

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

👍 I always forget about this

  of windows (when dependent on markers) watching models we watch a
simple change counter. The change counter indicates that Markers is done
doing work, and then Windows can proceede to do its processing. This way
a gMarker is sure to be available without a race of windows to markers.

build all

typo on WindowChild constructor usage in it's parent model

typos on scope.existingPieces

build all
@@ -183,6 +187,7 @@ angular.module("uiGmapgoogle-maps.directives.api.models.parent")
delete @scope.markerModels
@gMarkerManager.clear() if @gMarkerManager?
@scope.markerModels = new PropMap()
@scope.markerModelsUpdate.updateCtr += 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

all @scope.markerModelsUpdate.updateCtr += 1 are in the final .then of each promise and in the Destruction / Cleanup

@nmccready nmccready added the PR'd label Dec 4, 2014
@nmccready nmccready added this to the 2.0.12 milestone Dec 4, 2014
@aesnyder
Copy link

aesnyder commented Dec 4, 2014

looks great

@gWin.open @mapCtrl, maybeMarker
isOpen = @gWin.isOpen()
# @scope.$evalAsync =>
# ChromeFixes.maybeRepaint @gWin.content
Copy link

Choose a reason for hiding this comment

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

okay, so we still are going to have to figure out how to get the tail/x to show up consistently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to be working fine. I haven't seen it happen yet.

nmccready added a commit that referenced this pull request Dec 4, 2014
issue 960, 772, 946 ChildModel, clonedModel
@nmccready nmccready merged commit 1d342f0 into angular-ui:master Dec 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants