Comparing version 3.0.2 to 3.1.0
@@ -1196,7 +1196,11 @@ # Flot Reference # | ||
This function will also trigger the dispatching of the | ||
'onDrawingDone' custom event, which can be used to notify listeners | ||
(drawOverlay hooks) about the finishing of a drawing operation. | ||
'onDrawingDone' custom event on the eventholder, and 'drawingdone' | ||
event on the placeholder, which can be used to notify listeners | ||
about the finishing of a drawing operation (drawOverlay hooks). | ||
Use addEventListener('onDrawingDone', callback) and | ||
removeEventListener('onDrawingDone', callback), to register and unregister | ||
handlers for 'onDrawingDone' event. | ||
removeEventListener('onDrawingDone', callback) to register and | ||
unregister handlers for 'onDrawingDone' event, or use | ||
$('#placeholder').bind('drawingdone', callback) and | ||
$('#placeholder').unbind('drawingdone', callback) to | ||
register and unregister handlers for 'drawingdone' event. | ||
@@ -1652,7 +1656,12 @@ - width()/height() | ||
This hook dispatches the 'onDrawingDone' custom event. | ||
It notifies listeners about the finishing of a drawing operation. | ||
Use addEventListener('onDrawingDone', callback) and | ||
removeEventListener('onDrawingDone', callback), to register and unregister | ||
handlers for 'onDrawingDone' event. | ||
After this hook executes, the dispatching of the 'onDrawingDone' | ||
custom event on the eventholder will be triggered, as well as the | ||
'drawingdone' event will be fired on the placeholder, which can | ||
be used to notify listeners about the finishing of a drawing | ||
operation. Use addEventListener('onDrawingDone', callback) and | ||
removeEventListener('onDrawingDone', callback) to register and | ||
unregister handlers for 'onDrawingDone' event, or use | ||
$('#placeholder').bind('drawingdone', callback) and | ||
$('#placeholder').unbind('drawingdone', callback) to | ||
register and unregister handlers for 'drawingdone' event. | ||
@@ -1659,0 +1668,0 @@ - resize [phase 7] |
{ | ||
"name": "flot", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"main": "dist/es5/jquery.flot.js", | ||
@@ -22,2 +22,6 @@ "scripts": { | ||
"devDependencies": { | ||
"karma-browserify": "^6.0.0", | ||
"babelify": "~10.0.0", | ||
"vinyl-source-stream": "~2.0.0", | ||
"browserify": "~16.2.3", | ||
"@babel/cli": "^7.2.3", | ||
@@ -51,3 +55,5 @@ "@babel/core": "^7.4.0", | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"regenerator-runtime": "~0.13.2" | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
import regeneratorRuntime from "regenerator-runtime"; | ||
import {getCrossDomainCSSRules} from "./getCORSCss"; | ||
/** ## jquery.flot.composeImages.js | ||
@@ -112,16 +114,2 @@ | ||
function getCSSRules(document) { | ||
var styleSheets = document.styleSheets, | ||
rulesList = []; | ||
for (var i = 0; i < styleSheets.length; i++) { | ||
// in Chrome, the external CSS files are empty when the page is directly loaded from disk | ||
var rules = styleSheets[i].cssRules || []; | ||
for (var j = 0; j < rules.length; j++) { | ||
var rule = rules[j]; | ||
rulesList.push(rule.cssText); | ||
} | ||
} | ||
return rulesList; | ||
} | ||
function embedCSSRulesInSVG(rules, svg) { | ||
@@ -141,4 +129,4 @@ var text = [ | ||
function copySVGToImgMostBrowsers(svg, img) { | ||
var rules = getCSSRules(document), | ||
async function copySVGToImgMostBrowsers(svg, img) { | ||
var rules = await getCrossDomainCSSRules(document), | ||
source = embedCSSRulesInSVG(rules, svg); | ||
@@ -154,3 +142,3 @@ | ||
function copySVGToImgSafari(svg, img) { | ||
async function copySVGToImgSafari(svg, img) { | ||
// Use this method to convert a string buffer array to a binary string. | ||
@@ -171,3 +159,3 @@ // Do so by breaking up large strings into smaller substrings; this is necessary to avoid the | ||
var rules = getCSSRules(document), | ||
var rules = await getCrossDomainCSSRules(document), | ||
source = embedCSSRulesInSVG(rules, svg), | ||
@@ -174,0 +162,0 @@ data, |
@@ -64,6 +64,6 @@ /* Flot plugin for computing bottoms for filled line and bar charts. | ||
format = datapoints.format; | ||
var format = datapoints.format; | ||
var plotHasId = function(id) { | ||
var plotData = plot.getData(); | ||
for (i = 0; i < plotData.length; i++) { | ||
for (var i = 0; i < plotData.length; i++) { | ||
if (plotData[i].id === id) { | ||
@@ -70,0 +70,0 @@ return true; |
@@ -281,13 +281,18 @@ /* Flot plugin for drawing legends. | ||
var lf = labelFormatter, | ||
legendEntries = series.map(function(s, i) { | ||
return { | ||
label: (lf ? lf(s.label, s) : s.label) || 'Plot ' + (i + 1), | ||
color: s.color, | ||
options: { | ||
lines: s.lines, | ||
points: s.points, | ||
bars: s.bars | ||
legendEntries = series.reduce(function(validEntries, s, i) { | ||
var labelEval = (lf ? lf(s.label, s) : s.label) | ||
if (s.hasOwnProperty("label") ? labelEval : true) { | ||
var entry = { | ||
label: labelEval || 'Plot ' + (i + 1), | ||
color: s.color, | ||
options: { | ||
lines: s.lines, | ||
points: s.points, | ||
bars: s.bars | ||
} | ||
} | ||
}; | ||
}); | ||
validEntries.push(entry) | ||
} | ||
return validEntries; | ||
}, []); | ||
@@ -294,0 +299,0 @@ // Sort the legend using either the default or a custom comparator |
@@ -38,3 +38,3 @@ /* Pretty handling of log axes. | ||
for (var power = log10Start; power <= log10End; power++) { | ||
range = Math.pow(10, power); | ||
range = parseFloat('1e' + power); | ||
for (var mult = 1; mult < 9; mult += rangeStep) { | ||
@@ -41,0 +41,0 @@ val = range * mult; |
@@ -90,3 +90,3 @@ /* Pretty handling of time axes. | ||
if (dec < 6 && dec > 0) { | ||
var magnitude = Math.pow(10,dec-6); | ||
var magnitude = parseFloat('1e' + (dec-6)); | ||
n = Math.round(Math.round(n*magnitude)/magnitude); | ||
@@ -348,3 +348,3 @@ n = ('00000' + n).slice(-6,-(6 - dec)); | ||
} else { | ||
var magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10)); | ||
var magn = parseFloat('1e' + Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10)); | ||
var norm = (axis.delta / timeUnitSize.year) / magn; | ||
@@ -351,0 +351,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
986290
50
19488
1
31
1
3
1
+ Addedregenerator-runtime@~0.13.2
+ Addedregenerator-runtime@0.13.11(transitive)