Skip to content

Commit f1447de

Browse files
committed
Fix some typos found by codespell
Some of them also fix bugs in the code. Signed-off-by: Stefan Weil <[email protected]>
1 parent 76edb33 commit f1447de

File tree

15 files changed

+40
-40
lines changed

15 files changed

+40
-40
lines changed

dist/jspdf.debug.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@
21552155
var standardFields = !fieldArray;
21562156

21572157
if (!fieldArray) {
2158-
// in case there is no fieldArray specified, we wanna print out the Fields of the AcroForm
2158+
// in case there is no fieldArray specified, we want to print out the Fields of the AcroForm
21592159
// Print out Root
21602160
this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId);
21612161
this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString());
@@ -3353,7 +3353,7 @@ Q\n";
33533353
// ############ internal functions
33543354

33553355
/*
3356-
* small workaround for calculating the TextMetric aproximately
3356+
* small workaround for calculating the TextMetric approximately
33573357
* @param text
33583358
* @param fontsize
33593359
* @returns {TextMetrics} (Has Height and Width)
@@ -3925,7 +3925,7 @@ Q\n";
39253925
},
39263926
createDataURIFromElement = function createDataURIFromElement(element, format, angle) {
39273927

3928-
//if element is an image which uses data url defintion, just return the dataurl
3928+
//if element is an image which uses data url definition, just return the dataurl
39293929
if (element.nodeName === 'IMG' && element.hasAttribute('src')) {
39303930
var src = '' + element.getAttribute('src');
39313931
if (!angle && src.indexOf('data:image/') === 0) return src;
@@ -4048,7 +4048,7 @@ Q\n";
40484048
ICC_BASED: 'ICCBased',
40494049
INDEXED: 'Indexed',
40504050
PATTERN: 'Pattern',
4051-
SEPERATION: 'Seperation',
4051+
SEPARATION: 'Separation',
40524052
DEVICE_N: 'DeviceN'
40534053
};
40544054

@@ -4324,7 +4324,7 @@ Q\n";
43244324
if (processMethodNotEnabled(format)) throw new Error('please ensure that the plugin for \'' + format + '\' support is added');
43254325

43264326
/**
4327-
* need to test if it's more efficent to convert all binary strings
4327+
* need to test if it's more efficient to convert all binary strings
43284328
* to TypedArray - or should we just leave and process as string?
43294329
*/
43304330
if (this.supportsArrayBuffer()) {
@@ -4934,7 +4934,7 @@ Q\n";
49344934
this.printHeaderRow(ln, true);
49354935
}
49364936
}
4937-
//We ignore the passed y: the lines may have diferent heights
4937+
//We ignore the passed y: the lines may have different heights
49384938
y = getLastCellPosition().y + getLastCellPosition().h;
49394939
if (pgAdded) y = margin + 10;
49404940
}
@@ -6496,7 +6496,7 @@ Q\n";
64966496
renderer.y = oldPosition;
64976497
};
64986498

6499-
//check if footer contains totalPages which shoudl be replace at the disoposal of the document
6499+
//check if footer contains totalPages which should be replace at the disoposal of the document
65006500
var spans = footer.getElementsByTagName('span');
65016501
for (var i = 0; i < spans.length; ++i) {
65026502
if ((" " + spans[i].className + " ").replace(/[\n\t]/g, " ").indexOf(" totalPages ") > -1) {
@@ -6820,13 +6820,13 @@ Q\n";
68206820
}
68216821
this.y += maxLineHeight * fontToUnitRatio;
68226822

6823-
//if some watcher function was executed sucessful, so e.g. margin and widths were changed,
6823+
//if some watcher function was executed successful, so e.g. margin and widths were changed,
68246824
//reset line drawing and calculate position and lines again
68256825
//e.g. to stop text floating around an image
68266826
if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) {
68276827
var localFragments = [];
68286828
var localStyles = [];
6829-
//create fragement array of
6829+
//create fragment array of
68306830
lines.forEach(function (localLine) {
68316831
var i = 0;
68326832
var l = localLine.length;
@@ -7944,7 +7944,7 @@ Q\n";
79447944
/**
79457945
Splits a given string into an array of strings. Uses 'size' value
79467946
(in measurement units declared as default for the jsPDF instance)
7947-
and the font's "widths" and "Kerning" tables, where availabe, to
7947+
and the font's "widths" and "Kerning" tables, where available, to
79487948
determine display length of a given string for a given font.
79497949

79507950
We use character's 100% of unit size (height) as width when Width
@@ -12197,7 +12197,7 @@ Q\n";
1219712197
doc.close();
1219812198
} catch(ee) {
1219912199
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
12200-
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
12200+
doc.body.innerHTML = html; // ie9 doesn't support writing to documentElement
1220112201
}
1220212202
}
1220312203

@@ -12512,7 +12512,7 @@ Q\n";
1251212512
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
1251312513
this.images.forEach(function(image, index) {
1251412514
image.promise.then(function() {
12515-
log("Succesfully loaded image #"+ (index+1), image);
12515+
log("Successfully loaded image #"+ (index+1), image);
1251612516
}, function(e) {
1251712517
log("Failed loading image #"+ (index+1), image, e);
1251812518
});
@@ -13029,7 +13029,7 @@ Q\n";
1302913029
var canvasBackground = new NodeContainer(this.renderer.isTransparent(parent.css('backgroundColor')) ? element.ownerDocument.body : element.ownerDocument.documentElement, null);
1303013030
renderer.rectangle(0, 0, renderer.width, renderer.height, canvasBackground.css('backgroundColor'));
1303113031
}
13032-
parent.visibile = parent.isElementVisible();
13032+
parent.visible = parent.isElementVisible();
1303313033
this.createPseudoHideStyles(element.ownerDocument);
1303413034
this.disableAnimations(element.ownerDocument);
1303513035
this.nodes = flatten([parent].concat(this.getChildren(parent)).filter(function(container) {
@@ -15747,4 +15747,4 @@ Q\n";
1574715747

1574815748
return jsPDF;
1574915749

15750-
}));
15750+
}));

dist/jspdf.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ <h2><a href="#">Draw example: rectangles / squares</a></h2>
392392

393393
doc.setDrawColor(0);
394394
doc.setFillColor(255, 255, 255);
395-
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black sqaure with rounded corners
395+
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black square with rounded corners
396396

397397
doc.save('Test.pdf');</pre>
398398
<a href="javascript:demoRectangles()" class="button">Run Code</a></p></div>

examples/js/basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function demoRectangles() {
140140

141141
doc.setDrawColor(0);
142142
doc.setFillColor(255, 255, 255);
143-
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black sqaure with rounded corners
143+
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black square with rounded corners
144144

145145
doc.save('Test.pdf');
146146
}

libs/html2canvas/dist/html2canvas.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ function documentFromHTML(src) {
759759
doc.close();
760760
} catch(ee) {
761761
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
762-
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
762+
doc.body.innerHTML = html; // ie9 doesn't support writing to documentElement
763763
}
764764
}
765765

@@ -1074,7 +1074,7 @@ ImageLoader.prototype.fetch = function(nodes) {
10741074
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
10751075
this.images.forEach(function(image, index) {
10761076
image.promise.then(function() {
1077-
log("Succesfully loaded image #"+ (index+1), image);
1077+
log("Successfully loaded image #"+ (index+1), image);
10781078
}, function(e) {
10791079
log("Failed loading image #"+ (index+1), image, e);
10801080
});
@@ -1591,7 +1591,7 @@ function NodeParser(element, renderer, support, imageLoader, options) {
15911591
var canvasBackground = new NodeContainer(this.renderer.isTransparent(parent.css('backgroundColor')) ? element.ownerDocument.body : element.ownerDocument.documentElement, null);
15921592
renderer.rectangle(0, 0, renderer.width, renderer.height, canvasBackground.css('backgroundColor'));
15931593
}
1594-
parent.visibile = parent.isElementVisible();
1594+
parent.visible = parent.isElementVisible();
15951595
this.createPseudoHideStyles(element.ownerDocument);
15961596
this.disableAnimations(element.ownerDocument);
15971597
this.nodes = flatten([parent].concat(this.getChildren(parent)).filter(function(container) {

libs/html2canvas/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Skip lint and tests and simply build from source:
6464

6565
The library has two sets of tests. The first set is a number of qunit tests that check that different values parsed by browsers are correctly converted in html2canvas. To run these tests with grunt you'll need [phantomjs](http://phantomjs.org/).
6666

67-
The other set of tests run Firefox, Chrome and Internet Explorer with [webdriver](https://github.com/niklasvh/webdriver.js). The selenium standalone server (runs on Java) is required for these tests and can be downloaded from [here](http://code.google.com/p/selenium/downloads/list). They capture an actual screenshot from the test pages and compare the image to the screenshot created by html2canvas and calculate the percentage differences. These tests generally aren't expected to provide 100% matches, but while commiting changes, these should generally not go decrease from the baseline values.
67+
The other set of tests run Firefox, Chrome and Internet Explorer with [webdriver](https://github.com/niklasvh/webdriver.js). The selenium standalone server (runs on Java) is required for these tests and can be downloaded from [here](http://code.google.com/p/selenium/downloads/list). They capture an actual screenshot from the test pages and compare the image to the screenshot created by html2canvas and calculate the percentage differences. These tests generally aren't expected to provide 100% matches, but while committing changes, these should generally not go decrease from the baseline values.
6868

6969
Start by downloading the dependencies:
7070

libs/html2canvas/src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function documentFromHTML(src) {
191191
doc.close();
192192
} catch(ee) {
193193
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
194-
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
194+
doc.body.innerHTML = html; // ie9 doesn't support writing to documentElement
195195
}
196196
}
197197

libs/html2canvas/src/imageloader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ImageLoader.prototype.fetch = function(nodes) {
116116
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
117117
this.images.forEach(function(image, index) {
118118
image.promise.then(function() {
119-
log("Succesfully loaded image #"+ (index+1), image);
119+
log("Successfully loaded image #"+ (index+1), image);
120120
}, function(e) {
121121
log("Failed loading image #"+ (index+1), image, e);
122122
});

libs/html2canvas/src/nodeparser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function NodeParser(element, renderer, support, imageLoader, options) {
1212
var canvasBackground = new NodeContainer(this.renderer.isTransparent(parent.css('backgroundColor')) ? element.ownerDocument.body : element.ownerDocument.documentElement, null);
1313
renderer.rectangle(0, 0, renderer.width, renderer.height, canvasBackground.css('backgroundColor'));
1414
}
15-
parent.visibile = parent.isElementVisible();
15+
parent.visible = parent.isElementVisible();
1616
this.createPseudoHideStyles(element.ownerDocument);
1717
this.disableAnimations(element.ownerDocument);
1818
this.nodes = flatten([parent].concat(this.getChildren(parent)).filter(function(container) {

plugins/acroform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
var standardFields = (!fieldArray);
130130

131131
if (!fieldArray) {
132-
// in case there is no fieldArray specified, we wanna print out the Fields of the AcroForm
132+
// in case there is no fieldArray specified, we want to print out the Fields of the AcroForm
133133
// Print out Root
134134
this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId);
135135
this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString());
@@ -1348,7 +1348,7 @@ window["PasswordField"] = AcroForm.PasswordField;
13481348
// ############ internal functions
13491349

13501350
/*
1351-
* small workaround for calculating the TextMetric aproximately
1351+
* small workaround for calculating the TextMetric approximately
13521352
* @param text
13531353
* @param fontsize
13541354
* @returns {TextMetrics} (Has Height and Width)

0 commit comments

Comments
 (0)