Make self const

This commit is contained in:
Dennis Eichhorn 2017-08-26 20:20:24 +02:00
parent cb26a4b36b
commit cecb5736fb
11 changed files with 18 additions and 15 deletions

View File

@ -133,7 +133,8 @@
jsOMS.Chart.BarChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this, rect;
const self = this;
let rect;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset, function (c)
{

View File

@ -245,7 +245,7 @@
jsOMS.Chart.ChartAbstract.prototype.drawLegend = function (svg, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
if (typeof this.legend !== 'undefined' && this.legend.visible) {
dataPointEnter.append("text").attr('class', 'dataPoint-name');
@ -289,7 +289,8 @@
jsOMS.Chart.ChartAbstract.prototype.drawMarker = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this, temp;
const self = this;
let temp;
if (this.dataSettings.marker.visible) {
temp = dataPointEnter.append('g').attr('class', 'dots').attr('clip-path', 'url(#clipper1)').selectAll('circle').data(function (d)
@ -539,7 +540,7 @@
};
jsOMS.Chart.ChartAbstract.prototype.createXAxis = function (x) {
let self = this;
const self = this;
return d3.svg.axis().scale(x).tickFormat(function (d)
{
@ -549,7 +550,7 @@
};
jsOMS.Chart.ChartAbstract.prototype.createYAxis = function (y) {
let self = this;
const self = this;
return d3.svg.axis().scale(y).tickFormat(function (d)
{

View File

@ -133,7 +133,8 @@
jsOMS.Chart.ColumnChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this, rect;
const self = this;
let rect;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset, function (c)
{

View File

@ -214,7 +214,7 @@
jsOMS.Chart.LineChart.prototype.drawData = function (svg, line, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset, function (c)
{

View File

@ -60,8 +60,8 @@
jsOMS.Chart.PieChart.prototype.drawData = function (svg, dataPointEnter, dataPoint)
{
let self = this,
pie = d3.layout.pie()
const self = this;
let pie = d3.layout.pie()
.sort(null)
.value(function (d)
{

View File

@ -166,7 +166,7 @@
jsOMS.Chart.PyramidChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset[0].points, function (c)
{

View File

@ -113,7 +113,7 @@
jsOMS.Chart.ScatterplotChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset, function (c)
{

View File

@ -124,7 +124,7 @@
jsOMS.Chart.VWaterfallChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset[0].points, function (c)
{

View File

@ -124,7 +124,7 @@
jsOMS.Chart.WaterfallChart.prototype.drawData = function (svg, x, y, dataPointEnter, dataPoint)
{
let self = this;
const self = this;
dataPoint = svg.selectAll(".dataPoint").data(this.chart.dataset[0].points, function (c)
{

View File

@ -25,7 +25,7 @@
jsOMS.Message.Notification.Browser.BrowserNotification.prototype.requestPermission = function()
{
let self = this;
const self = this;
if(Notification.permission !== 'granted' && Notification.permission !== 'denied') {
Notification.requestPermission(function(permission) {

View File

@ -30,7 +30,7 @@
this.dragNDrop = new jsOMS.UI.DragNDrop(this.app);
this.generalUI = new jsOMS.UI.GeneralUI();
let self = this;
const self = this;
this.domObserver = new MutationObserver(function(mutations) {
const length = mutations.length;