removed unecessary regex in Class file which was tripping up the JS minifier

This commit is contained in:
Eric Rowell 2012-07-11 22:55:18 -07:00
parent 780d5568db
commit d4f03e64b1
5 changed files with 10 additions and 13 deletions

View File

@ -3,7 +3,7 @@
* http://www.kineticjs.com/
* Copyright 2012, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Jul 08 2012
* Date: Jul 11 2012
*
* Copyright (C) 2011 - 2012 by Eric Rowell
*
@ -281,8 +281,7 @@ Kinetic.Type = {
*/
// Inspired by base2 and Prototype
(function() {
var initializing = false, fnTest = /xyz/.test(function() { xyz;
}) ? /\b_super\b/ : /.*/;
var initializing = false;
// The base Class implementation (does nothing)
Kinetic.Class = function() {
};
@ -299,7 +298,7 @@ Kinetic.Type = {
// Copy the properties over onto the new prototype
for(var name in prop) {
// Check if we're overwriting an existing function
prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn) {
prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" ? (function(name, fn) {
return function() {
var tmp = this._super;
@ -1783,7 +1782,6 @@ Kinetic.Container = Kinetic.Node.extend({
* animations
* @constructor
* @augments Kinetic.Container
* @augments Kinetic.Node
* @param {String|DomElement} cont Container id or DOM element
* @param {int} width
* @param {int} height

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@
* animations
* @constructor
* @augments Kinetic.Container
* @augments Kinetic.Node
* @param {String|DomElement} cont Container id or DOM element
* @param {int} width
* @param {int} height

View File

@ -7,8 +7,7 @@
*/
// Inspired by base2 and Prototype
(function() {
var initializing = false, fnTest = /xyz/.test(function() { xyz;
}) ? /\b_super\b/ : /.*/;
var initializing = false;
// The base Class implementation (does nothing)
Kinetic.Class = function() {
};
@ -25,7 +24,7 @@
// Copy the properties over onto the new prototype
for(var name in prop) {
// Check if we're overwriting an existing function
prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn) {
prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" ? (function(name, fn) {
return function() {
var tmp = this._super;

View File

@ -2,7 +2,7 @@
<html>
<head>
<link rel="stylesheet" type="text/css"href="../base.css">
<script src="../../dist/kinetic-core.js"></script>
<script src="../../dist/kinetic-core.min.js"></script>
<script src="../assets/worldMap.js"></script>
<script src="../assets/tiger.js"></script>
<script src="../assets/unitDataUrls.js"></script>