Comparing version 2.8.3 to 2.8.4
/** | ||
* oCanvas v2.8.3 | ||
* oCanvas v2.8.4 | ||
* http://ocanvas.org/ | ||
* | ||
* Copyright 2011-2015, Johannes Koggdal | ||
* Copyright 2011-2016, Johannes Koggdal | ||
* Licensed under the MIT license | ||
@@ -7,0 +7,0 @@ * http://ocanvas.org/license |
{ | ||
"name": "ocanvas", | ||
"version": "2.8.3", | ||
"version": "2.8.4", | ||
"author": "Johannes Koggdal <johannes@koggdal.com>", | ||
@@ -5,0 +5,0 @@ "description": "Library for HTML5 Canvas, based on objects instead of pixels.", |
@@ -7,3 +7,3 @@ (function(window, document, undefined){ | ||
// Version number of this oCanvas release. | ||
version: "2.8.3", | ||
version: "2.8.4", | ||
@@ -10,0 +10,0 @@ // Array containing all canvases created by oCanvas on the current page |
@@ -67,6 +67,15 @@ (function(oCanvas, window, document, undefined){ | ||
var a = document.createElement('a'); | ||
a.href = document.referrer; | ||
if (a.host === window.location.host && window.parent !== window) { | ||
oCanvas.addDOMEventHandler(core, window.parent.document, type, function (e) { | ||
// We also want to listen to events on the parent document to detect pointer movements | ||
// to and from this document. | ||
// | ||
// Wrap in try...catch in case the documents are of different origins (since that will | ||
// throw an exception). This functionality is not strictly needed, but if we can access | ||
// the parent document we can provide better pointer event detection between the | ||
// documents. | ||
var parentDocument = null; | ||
try { | ||
parentDocument = window.parent.document; | ||
} catch (e) {} | ||
if (parentDocument) { | ||
oCanvas.addDOMEventHandler(core, parentDocument, type, function (e) { | ||
self.docHandler(e); | ||
@@ -73,0 +82,0 @@ }, false); |
@@ -70,6 +70,15 @@ (function(oCanvas, window, document, undefined){ | ||
var a = document.createElement('a'); | ||
a.href = document.referrer; | ||
if (a.host === window.location.host && window.parent !== window) { | ||
oCanvas.addDOMEventHandler(core, window.parent.document, type, function (e) { | ||
// We also want to listen to events on the parent document to detect pointer movements | ||
// to and from this document. | ||
// | ||
// Wrap in try...catch in case the documents are of different origins (since that will | ||
// throw an exception). This functionality is not strictly needed, but if we can access | ||
// the parent document we can provide better pointer event detection between the | ||
// documents. | ||
var parentDocument = null; | ||
try { | ||
parentDocument = window.parent.document; | ||
} catch (e) {} | ||
if (parentDocument) { | ||
oCanvas.addDOMEventHandler(core, parentDocument, type, function (e) { | ||
self.docHandler(e); | ||
@@ -76,0 +85,0 @@ }, false); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2093132
48
43413