Improved logging and adjusted card's click handler
+ Logging now also works when ipcRenderer is appended to the window element. + Card's callback replacement method was changed from click to pointerdown.
This commit is contained in:
+4
-4
@@ -176,7 +176,7 @@ export default class Card {
|
||||
*/
|
||||
static _replaceCallback(context, element, attributeVal) {
|
||||
if (element.tagName == 'A') {
|
||||
element.addEventListener('click', event => {
|
||||
element.addEventListener('pointerdown', event => {
|
||||
event.preventDefault()
|
||||
})
|
||||
}
|
||||
@@ -269,7 +269,7 @@ export default class Card {
|
||||
*/
|
||||
return html.replace(
|
||||
/<\s*(a|video|img|image|circle)\s(.*?)(xlink:href|href|src)\s*=\s*["'](\..*?)["']\s*(.*?)>/g,
|
||||
function() {
|
||||
function () {
|
||||
let path = that._getRelativePath(arguments[4])
|
||||
const tag = `<${arguments[1]} ${arguments[2]} ${arguments[3]}="${path}" ${arguments[5]}>`
|
||||
/* if (that.debug) */ console.log('Adjusted: ', tag)
|
||||
@@ -298,7 +298,7 @@ export default class Card {
|
||||
return new Promise((resolve, reject) => {
|
||||
let request = new XMLHttpRequest()
|
||||
|
||||
request.onreadystatechange = function() {
|
||||
request.onreadystatechange = function () {
|
||||
if (this.readyState == 4) {
|
||||
if (this.status == 200 || Card._isLocal()) {
|
||||
try {
|
||||
@@ -1593,7 +1593,7 @@ export default class Card {
|
||||
})
|
||||
},
|
||||
onUpdateParams: ['{self}'],
|
||||
onUpdate: function(self) {
|
||||
onUpdate: function (self) {
|
||||
let transform = self.target._gsTransform
|
||||
|
||||
TweenLite.set(title, {
|
||||
|
||||
Reference in New Issue
Block a user