Explorar o código

Merge branch 'master' into fix/mobile-touches

* master:
  fix browserless image generation by checking for window.matchMedia
  remove comments xmls from test/data
sschmid %!s(int64=4) %!d(string=hai) anos
pai
achega
ee0ba92068

+ 3 - 0
src/Display/WebDisplayInteractionManager.ts

@@ -156,6 +156,9 @@ export class WebDisplayInteractionManager extends AbstractDisplayInteractionMana
         if (("ontouchstart" in window) || (window as any).DocumentTouch) {
             return true;
         }
+        if (!window.matchMedia) {
+            return false; // if running browserless / in nodejs (generateImages / visual regression tests)
+        }
         // include the 'heartz' as a way to have a non matching MQ to help terminate the join
         // https://git.io/vznFH
         const prefixes: string[] = ["-webkit-", "-moz-", "-o-", "-ms-"];

+ 0 - 9
test/data/Beethoven_AnDieFerneGeliebte_comments.xml

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<annotations layer-name="Jeff's Comments" layer-uuid="5fa6e6c2-7221-4f73-8e29-36b9cee13f8a">
-  <staffline id="0">
-    <comment r="0" g="255" b="0" size="1.4" font="Times New Roman">I strongly disagree. I sing it perfectly. -Jeff<location num="3" denom="4"><relative-position x="3.9422248367435984" y="-5.879999999999999"/></location></comment>
-    <symbol r="0" g="0" b="255" size="2.739159746984312" font="Gonville">f<location num="1" denom="4" whole="5"><relative-position x="0.06931901831887899" y="6.530623487109466"/></location></symbol>
-    <symbol r="0" g="255" b="0" size="3.5688423576235606" font="Gonville"><location num="1" denom="8" whole="1"><relative-position x="-1.495536774743897" y="-2.030000000000001"/></location></symbol>
-    <symbol r="0" g="255" b="0" size="3.5688423576235606" font="Gonville"><location num="3" denom="4" whole="8"><relative-position x="-0.7176310980856613" y="-2.61261309992247"/></location></symbol>
-  </staffline>
-</annotations>

+ 0 - 10
test/data/Beethoven_AnDieFerneGeliebte_comments_2.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<annotations layer-name="John's Comments" layer-uuid="bc3f2f19-8099-4298-9b69-f2109d7b2bac">
-  <staffline id="0">
-    <comment r="255" g="0" b="0" size="1.4" font="Times New Roman">This note should be sung better, Jeffrey<location num="3" denom="4"><relative-position x="1.4422248367435984" y="-3.9800000000000004"/></location></comment>
-    <symbol r="255" g="0" b="0" size="3.469280381047092" font="Gonville">↓<location num="3" denom="4"><relative-position x="-0.6577751632564031" y="-4.48"/></location></symbol>
-  </staffline>
-  <staffline id="1">
-    <comment r="0" g="0" b="255" size="1.9592579663838987" font="Times New Roman">With more grace...<location num="1" denom="4" whole="4"><relative-position x="-0.6747661771085802" y="-5.2893765128905414"/></location></comment>
-  </staffline>
-</annotations>