Skip to content

Commit

Permalink
Fix click by image marker in dxVectorMap issue (T567545) (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderPolosatov authored Oct 31, 2017
1 parent 64c0b4a commit 3537238
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion js/viz/vector_map/map_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,10 @@ strategiesByElementType[TYPE_MARKER] = {

image: {
_draw: function(ctx, figure, data) {
figure.image = ctx.renderer.image().attr({ location: "center" }).data(ctx.dataKey, data).append(figure.root);
figure.image = ctx.renderer.image(null, null, null, null, null, "center")
.attr({ "pointer-events": "visible" })//T567545
.data(ctx.dataKey, data)
.append(figure.root);
},

refresh: function(ctx, figure, data, proxy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,14 +1080,11 @@ QUnit.test("Draw", function(assert) {
pointImageStrategy.draw(this.context, figure, "test-data");

assert.deepEqual(this.renderer.g.lastCall.args, [], "root is created");
assert.deepEqual(this.renderer.image.lastCall.args, [], "image is created");

assert.deepEqual(this.renderer.image.lastCall.args, [null, null, null, null, null, "center"], "image is created");
assert.strictEqual(figure.root, this.renderer.g.lastCall.returnValue, "root");
assert.strictEqual(figure.image, this.renderer.image.lastCall.returnValue, "image");

assert.deepEqual(figure.image.attr.lastCall.args, [{ location: "center" }], "image settings");
assert.deepEqual(figure.image.attr.lastCall.args, [{ "pointer-events": "visible" }], "image settings");//T567545
assert.deepEqual(figure.image.data.lastCall.args, ["data-key", "test-data"], "image data");

assert.deepEqual(figure.image.append.lastCall.args, [figure.root], "image is appended");
});

Expand Down

0 comments on commit 3537238

Please sign in to comment.