mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Clean up
This commit is contained in:
parent
7c0b893564
commit
bca6458301
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,5 +11,6 @@ image.jpg
|
|||||||
/.settings/
|
/.settings/
|
||||||
node_modules/
|
node_modules/
|
||||||
.envrc
|
.envrc
|
||||||
|
server.js
|
||||||
tests/selenium.js
|
tests/selenium.js
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
7
Makefile
7
Makefile
@ -1,7 +0,0 @@
|
|||||||
build:
|
|
||||||
ant
|
|
||||||
|
|
||||||
install:
|
|
||||||
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/ant.rb
|
|
||||||
|
|
||||||
.PHONY: install build
|
|
@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"folders":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"path": ".",
|
|
||||||
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"],
|
|
||||||
"file_exclude_patterns": ["*.sublime-workspace"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings":
|
|
||||||
{
|
|
||||||
// The number of spaces a tab is considered equal to
|
|
||||||
"tab_size": 4,
|
|
||||||
|
|
||||||
// Set to true to insert spaces when tab is pressed
|
|
||||||
"translate_tabs_to_spaces": true,
|
|
||||||
|
|
||||||
// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
|
|
||||||
// backspace insert/delete up to the next tabstop
|
|
||||||
"use_tab_stops": false,
|
|
||||||
|
|
||||||
// Set to false to disable detection of tabs vs. spaces on load
|
|
||||||
"detect_indentation": false,
|
|
||||||
|
|
||||||
// Set to true to removing trailing white space on save
|
|
||||||
"trim_trailing_white_space_on_save": true,
|
|
||||||
|
|
||||||
// Set to true to ensure the last line of the file ends in a newline
|
|
||||||
// character when saving
|
|
||||||
"ensure_newline_at_eof_on_save": false,
|
|
||||||
|
|
||||||
// Linting
|
|
||||||
"jshint_options": {
|
|
||||||
"eqeqeq": false,
|
|
||||||
|
|
||||||
"laxbreak": true,
|
|
||||||
"undef": true,
|
|
||||||
"newcap": true,
|
|
||||||
"noarg": true,
|
|
||||||
"strict": false,
|
|
||||||
"trailing": true,
|
|
||||||
"onecase": true,
|
|
||||||
|
|
||||||
"boss": true,
|
|
||||||
"eqnull": true,
|
|
||||||
|
|
||||||
"onevar": false,
|
|
||||||
|
|
||||||
"evil": true,
|
|
||||||
"regexdash": true,
|
|
||||||
"browser": true,
|
|
||||||
"wsh": true,
|
|
||||||
"trailing": true,
|
|
||||||
"sub": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
/**
|
|
||||||
@license html2canvas @VERSION@ <http://html2canvas.hertzen.com>
|
|
||||||
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
|
|
||||||
http://www.twitter.com/niklasvh
|
|
||||||
|
|
||||||
Released under MIT License
|
|
||||||
*/
|
|
27
src/Parse.js
27
src/Parse.js
@ -1,15 +1,3 @@
|
|||||||
/*
|
|
||||||
html2canvas @VERSION@ <http://html2canvas.hertzen.com>
|
|
||||||
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
|
|
||||||
http://www.twitter.com/niklasvh
|
|
||||||
|
|
||||||
Released under MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* New function for traversing elements
|
|
||||||
*/
|
|
||||||
|
|
||||||
_html2canvas.Parse = function ( images, options ) {
|
_html2canvas.Parse = function ( images, options ) {
|
||||||
window.scroll(0,0);
|
window.scroll(0,0);
|
||||||
|
|
||||||
@ -111,17 +99,6 @@ _html2canvas.Parse = function ( images, options ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
var rootStack = new this.storageContext($(document).width(),$(document).height());
|
|
||||||
rootStack.opacity = this.getCSS(this.element,"opacity");
|
|
||||||
var stack = this.newElement(this.element,rootStack);
|
|
||||||
|
|
||||||
|
|
||||||
this.parseElement(this.element,stack);
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var getCSS = _html2canvas.Util.getCSS;
|
var getCSS = _html2canvas.Util.getCSS;
|
||||||
function getCSSInt(element, attribute) {
|
function getCSSInt(element, attribute) {
|
||||||
@ -350,12 +327,12 @@ _html2canvas.Parse = function ( images, options ) {
|
|||||||
|
|
||||||
if (range.getBoundingClientRect()) {
|
if (range.getBoundingClientRect()) {
|
||||||
bounds = range.getBoundingClientRect();
|
bounds = range.getBoundingClientRect();
|
||||||
}else{
|
} else {
|
||||||
bounds = {};
|
bounds = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
// it isn't supported, so let's wrap it inside an element instead and get the bounds there
|
// it isn't supported, so let's wrap it inside an element instead and get the bounds there
|
||||||
|
|
||||||
// IE 9 bug
|
// IE 9 bug
|
||||||
|
@ -157,7 +157,7 @@ _html2canvas.Renderer.Canvas = function( options ) {
|
|||||||
}
|
}
|
||||||
} else if (renderItem.name === "drawImage") {
|
} else if (renderItem.name === "drawImage") {
|
||||||
|
|
||||||
if (renderItem['arguments'][8] > 0 && renderItem['arguments'][7]){
|
if (renderItem['arguments'][8] > 0 && renderItem['arguments'][7] > 0) {
|
||||||
if ( hasCTX && options.taintTest ) {
|
if ( hasCTX && options.taintTest ) {
|
||||||
if ( safeImages.indexOf( renderItem['arguments'][ 0 ].src ) === -1 ) {
|
if ( safeImages.indexOf( renderItem['arguments'][ 0 ].src ) === -1 ) {
|
||||||
testctx.drawImage( renderItem['arguments'][ 0 ], 0, 0 );
|
testctx.drawImage( renderItem['arguments'][ 0 ], 0, 0 );
|
||||||
|
@ -1 +0,0 @@
|
|||||||
v0.34
|
|
Loading…
Reference in New Issue
Block a user