Skip to content

Commit

Permalink
Updated the license, improved the viewport and improved the behavior …
Browse files Browse the repository at this point in the history
…of the control on touch devices
  • Loading branch information
carlosrafaelgn committed Aug 12, 2014
1 parent e8e5b26 commit b4be566
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,6 +7,7 @@ obj/
*.pdf
*.png
*.gif
indexTest.html
indexTest2.html
GraphicEqualizer.csproj
GraphicEqualizer.csproj.user
Expand Down
2 changes: 1 addition & 1 deletion Analyzer.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion AnalyzerWL.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
27 changes: 10 additions & 17 deletions Common.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -46,10 +46,12 @@ function $(e) {
return document.getElementById(e);
}
function cancelEvent(e) {
if (e.stopPropagation)
e.stopPropagation();
if (e.isCancelled !== undefined)
e.isCancelled = true;
if (e.preventDefault)
e.preventDefault();
if (e.stopPropagation)
e.stopPropagation();
return false;
}
function leftTop(element) {
Expand All @@ -71,18 +73,9 @@ function leftTop(element) {
}
window.touchMouse = (_isTouch ? {
_cloneEvent: function (e, cx, cy, px, py) {
var c = { button: 0, target: e.target, eventPhase: e.eventPhase, clientX: cx, clientY: cy, pageX: px, pageY: py };
if (e.stopPropagation) c.stopPropagation = function () { return e.stopPropagation(); };
var c = { button: 0, target: e.target, eventPhase: e.eventPhase, clientX: cx, clientY: cy, pageX: px, pageY: py, isCancelled: false };
if (e.preventDefault) c.preventDefault = function () { return e.preventDefault(); };
if (e.cancelBubble !== undefined) c.cancelBubble = e.cancelBubble;
if (e.cancel !== undefined) c.cancel = e.cancel;
if (e.returnValue !== undefined) c.returnValue = e.returnValue;
return c;
},
_terminateEvent: function (e, c) {
if (c.cancelBubble) e.cancelBubble = c.cancelBubble;
if (c.cancel) e.cancel = c.cancel;
if (e.returnValue !== undefined) e.returnValue = c.returnValue;
if (e.stopPropagation) c.stopPropagation = function () { return e.stopPropagation(); };
return c;
},
_touchstartc: function (e) {
Expand All @@ -106,7 +99,7 @@ window.touchMouse = (_isTouch ? {
for (i = l.length - 1; i >= 0; i--)
l[i].call(t, c);
}
touchMouse._terminateEvent(e, c);
return !c.isCancelled;
},
_touchmovec: function (e) {
return touchMouse.touchmove(this, "_tc", e);
Expand All @@ -121,7 +114,7 @@ window.touchMouse = (_isTouch ? {
for (i = l.length - 1; i >= 0; i--)
l[i].call(t, c);
}
touchMouse._terminateEvent(e, c);
return !c.isCancelled;
},
_touchendc: function (e) {
return touchMouse.touchend(this, "_tc", e);
Expand All @@ -142,7 +135,7 @@ window.touchMouse = (_isTouch ? {
for (i = l.length - 1; i >= 0; i--)
l[i].call(t, c);
}
touchMouse._terminateEvent(e, c);
return !c.isCancelled;
}
} : undefined);
window.attachMouse = (_isTouch ? function (observable, eventName, targetFunction, capturePhase) {
Expand Down
2 changes: 1 addition & 1 deletion FFTNR.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion GraphicalFilterEditor.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion GraphicalFilterEditorControl.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion WaveExporterWorker.js
@@ -1,7 +1,7 @@
//
// GraphicalFilterEditor is distributed under the FreeBSD License
//
// Copyright (c) 2013, Carlos Rafael Gimenes das Neves
// Copyright (c) 2012-2014, Carlos Rafael Gimenes das Neves
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 4 additions & 2 deletions index.html
@@ -1,8 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=544" />
<meta charset="utf-8" />
<script type="text/javascript">//<![CDATA[
"use strict"; (function () { var vp = document.createElement("meta"); vp.setAttribute("name", "viewport"); vp.setAttribute("content", (screen.availWidth >= 544) ? "width=device-width, initial-scale=1" : "width=544"); document.head.appendChild(vp); })(); //]]>
</script>
<link rel="Shortcut Icon" href="/favicon.ico" />
<title>Graphical Filter Editor (Test)</title>
<style type="text/css">
Expand Down

0 comments on commit b4be566

Please sign in to comment.