Skip to content

Instantly share code, notes, and snippets.

@artyil
Last active August 29, 2015 14:25
Show Gist options
  • Save artyil/9645667eb764a1091e3d to your computer and use it in GitHub Desktop.
Save artyil/9645667eb764a1091e3d to your computer and use it in GitHub Desktop.
intellij idea wrong "find usages" behavior for javascript object properties
/**
* A snippet that describe the problem
*
* @link http://stackoverflow.com/questions/31538240/intellij-idea-wrong-find-usages-behavior-for-javascript-object-properties
*/
function testFindUsagesInIDEA(element) {
'use strict';
var object1 = {
canvas: d3.select('#canvas-test')
};
object1.property = d3.time.scale()
.range([0, 800]);
var object2 ={
property: d3.time.scale()
.range([0, 800])
};
object2.extent = function (extent) {
if (!arguments.length) {
return object2.property.domain();
}
object2.property.domain(extent.slice());
return object2;
};
var redraw = function(x1,x2) {
object1.property
.range([x1,x2]);
object2.property
.range([x1,x2]);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment