GitHub PullRequestReviewCommentEvent at 2014-01-28 12:22:05
Repository: ol3
Actor: twpayne
Payload: {"comment":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/comments/9225058","id":9225058,"diff_hunk":"@@ -526,6 +526,42 @@ describe('ol.format.KML', function() {\n         expect(style.getStroke().getWidth()).to.be(1);\n       });\n \n+      it('can read a feature\\'s IconStyle', function() {\n+        var text =\n+            '<kml xmlns=\"http://earth.google.com/kml/2.2\">' +\n+            '  <Placemark>' +\n+            '    <Style>' +\n+            '      <IconStyle>' +\n+            '        <Icon>' +\n+            '          <href>http://foo.png</href>' +\n+            '        </Icon>' +\n+            '      </IconStyle>' +\n+            '    </Style>' +\n+            '  </Placemark>' +\n+            '</kml>';\n+        var fs = format.readFeatures(text);\n+        expect(fs).to.have.length(1);\n+        var f = fs[0];\n+        expect(f).to.be.an(ol.Feature);\n+        var styleFunction = f.getStyleFunction();\n+        expect(styleFunction).not.to.be(undefined);\n+        var styleArray = styleFunction.call(f, 0);\n+        expect(styleArray).to.be.an(Array);\n+        expect(styleArray).to.have.length(1);\n+        var style = styleArray[0];\n+        expect(style).to.be.an(ol.style.Style);\n+        expect(style.getFill()).to.be(ol.format.KML.DEFAULT_FILL_STYLE_);\n+        expect(style.getStroke()).to.be(ol.format.KML.DEFAULT_STROKE_STYLE_);\n+        var imageStyle = style.getImage();\n+        expect(imageStyle).to.be.an(ol.style.Icon);\n+        expect(imageStyle.getSrc()).to.eql('http://foo.png');\n+        expect(imageStyle.anchor).to.eql([0.5, 0.5]);\n+        expect(imageStyle.rotation_).to.eql(0);","path":"test/spec/ol/format/kmlformat.test.js","position":34,"original_position":34,"commit_id":"78990707dce38692919d5c20704e211a1204e306","original_commit_id":"78990707dce38692919d5c20704e211a1204e306","user":{"login":"twpayne","id":6942,"avatar_url":"https://gravatar.com/avatar/223139cd460f00528796f94dc2415633?d=https%3A%2F%2Fidenticons.github.com%2Fc236337b043acf93c7df397fdb9082b3.png&r=x","gravatar_id":"223139cd460f00528796f94dc2415633","url":"https://api.github.com/users/twpayne","html_url":"https://github.com/twpayne","followers_url":"https://api.github.com/users/twpayne/followers","following_url":"https://api.github.com/users/twpayne/following{/other_user}","gists_url":"https://api.github.com/users/twpayne/gists{/gist_id}","starred_url":"https://api.github.com/users/twpayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twpayne/subscriptions","organizations_url":"https://api.github.com/users/twpayne/orgs","repos_url":"https://api.github.com/users/twpayne/repos","events_url":"https://api.github.com/users/twpayne/events{/privacy}","received_events_url":"https://api.github.com/users/twpayne/received_events","type":"User","site_admin":false},"body":"Better to use `getRotation()` here.","created_at":"2014-01-28T12:22:05Z","updated_at":"2014-01-28T12:22:05Z","html_url":"https://github.com/openlayers/ol3/pull/1607#discussion_r9225058","pull_request_url":"https://api.github.com/repos/openlayers/ol3/pulls/1607","_links":{"self":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/comments/9225058"},"html":{"href":"https://github.com/openlayers/ol3/pull/1607#discussion_r9225058"},"pull_request":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/1607"}}}}