Difference between revisions of "Team:UCopenhagen/Poster"

Line 29: Line 29:
 
       #Top {display: block;}
 
       #Top {display: block;}
 
        
 
        
  </style>
+
    </style>
</head>
+
     <script type="text/javascript">
<body>
+
     <script>
+
      /*! Image Map Resizer (imageMapResizer.min.js ) - v1.0.10 - 2019-04-10
+
      *  Desc: Resize HTML imageMap to scaled image.
+
      *  Copyright: (c) 2019 David J. Bradshaw - dave@bradshaw.net
+
      *  License: MIT
+
      */
+
 
+
      !function(){"use strict";function r(){function e(){var r={width:u.width/u.naturalWidth,height:u.height/u.naturalHeight},a={width:parseInt(window.getComputedStyle(u,null).getPropertyValue("padding-left"),10),height:parseInt(window.getComputedStyle(u,null).getPropertyValue("padding-top"),10)};i.forEach(function(e,t){var n=0;o[t].coords=e.split(",").map(function(e){var t=1==(n=1-n)?"width":"height";return a[t]+Math.floor(Number(e)*r[t])}).join(",")})}function t(e){return e.coords.replace(/ *, */g,",").replace(/ +/g,",")}function n(){clearTimeout(d),d=setTimeout(e,250)}function r(e){return document.querySelector('img[usemap="'+e+'"]')}var a=this,o=null,i=null,u=null,d=null;"function"!=typeof a._resize?(o=a.getElementsByTagName("area"),i=Array.prototype.map.call(o,t),u=r("#"+a.name)||r(a.name),a._resize=e,u.addEventListener("load",e,!1),window.addEventListener("focus",e,!1),window.addEventListener("resize",n,!1),window.addEventListener("readystatechange",e,!1),document.addEventListener("fullscreenchange",e,!1),u.width===u.naturalWidth&&u.height===u.naturalHeight||e()):a._resize()}function e(){function t(e){e&&(!function(e){if(!e.tagName)throw new TypeError("Object is not a valid DOM element");if("MAP"!==e.tagName.toUpperCase())throw new TypeError("Expected <MAP> tag, found <"+e.tagName+">.")}(e),r.call(e),n.push(e))}var n;return function(e){switch(n=[],typeof e){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(e||"map"),t);break;case"object":t(e);break;default:throw new TypeError("Unexpected data type ("+typeof e+").")}return n}}"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e():window.imageMapResize=e(),"jQuery"in window&&(window.jQuery.fn.imageMapResize=function(){return this.filter("map").each(r).end()})}();
+
      //# sourceMappingURL=imageMapResizer.map
+
    </script>
+
    <script>
+
 
       //Here I do the tabulator system!
 
       //Here I do the tabulator system!
 
       function openIL(evt, ILName) {
 
       function openIL(evt, ILName) {
Line 58: Line 46:
 
         }       
 
         }       
 
     </script>
 
     </script>
 +
    <script type="text/javascript">
 +
      /*! Image Map Resizer
 +
      *  Desc: Resize HTML imageMap to scaled image.
 +
      *  Copyright: (c) 2014-15 David J. Bradshaw - dave@bradshaw.net
 +
      *  License: MIT
 +
      */
  
 +
      ;(function() {
 +
        'use strict'
 +
 +
        function scaleImageMap() {
 +
          function resizeMap() {
 +
            function resizeAreaTag(cachedAreaCoords, idx) {
 +
              function scale(coord) {
 +
                var dimension = 1 === (isWidth = 1 - isWidth) ? 'width' : 'height'
 +
                return (
 +
                  padding[dimension] +
 +
                  Math.floor(Number(coord) * scalingFactor[dimension])
 +
                )
 +
              }
 +
 +
              var isWidth = 0
 +
              areas[idx].coords = cachedAreaCoords
 +
                .split(',')
 +
                .map(scale)
 +
                .join(',')
 +
            }
 +
 +
            var scalingFactor = {
 +
              width: image.width / image.naturalWidth,
 +
              height: image.height / image.naturalHeight,
 +
            }
 +
 +
            var padding = {
 +
              width: parseInt(
 +
                window.getComputedStyle(image, null).getPropertyValue('padding-left'),
 +
                10
 +
              ),
 +
              height: parseInt(
 +
                window.getComputedStyle(image, null).getPropertyValue('padding-top'),
 +
                10
 +
              ),
 +
            }
 +
 +
            cachedAreaCoordsArray.forEach(resizeAreaTag)
 +
          }
 +
 +
          function getCoords(e) {
 +
            //Normalize coord-string to csv format without any space chars
 +
            return e.coords.replace(/ *, */g, ',').replace(/ +/g, ',')
 +
          }
 +
 +
          function debounce() {
 +
            clearTimeout(timer)
 +
            timer = setTimeout(resizeMap, 250)
 +
          }
 +
 +
          function start() {
 +
            if (
 +
              image.width !== image.naturalWidth ||
 +
              image.height !== image.naturalHeight
 +
            ) {
 +
              resizeMap()
 +
            }
 +
          }
 +
 +
          function addEventListeners() {
 +
            image.addEventListener('load', resizeMap, false) //Detect late image loads in IE11
 +
            window.addEventListener('focus', resizeMap, false) //Cope with window being resized whilst on another tab
 +
            window.addEventListener('resize', debounce, false)
 +
            window.addEventListener('readystatechange', resizeMap, false)
 +
            document.addEventListener('fullscreenchange', resizeMap, false)
 +
          }
 +
 +
          function beenHere() {
 +
            return 'function' === typeof map._resize
 +
          }
 +
 +
          function getImg(name) {
 +
            return document.querySelector('img[usemap="' + name + '"]')
 +
          }
 +
 +
          function setup() {
 +
            areas = map.getElementsByTagName('area')
 +
            cachedAreaCoordsArray = Array.prototype.map.call(areas, getCoords)
 +
            image = getImg('#' + map.name) || getImg(map.name)
 +
            map._resize = resizeMap //Bind resize method to HTML map element
 +
          }
 +
 +
          var /*jshint validthis:true */
 +
            map = this,
 +
            areas = null,
 +
            cachedAreaCoordsArray = null,
 +
            image = null,
 +
            timer = null
 +
 +
          if (!beenHere()) {
 +
            setup()
 +
            addEventListeners()
 +
            start()
 +
          } else {
 +
            map._resize() //Already setup, so just resize map
 +
          }
 +
        }
 +
 +
        function factory() {
 +
          function chkMap(element) {
 +
            if (!element.tagName) {
 +
              throw new TypeError('Object is not a valid DOM element')
 +
            } else if ('MAP' !== element.tagName.toUpperCase()) {
 +
              throw new TypeError(
 +
                'Expected <MAP> tag, found <' + element.tagName + '>.'
 +
              )
 +
            }
 +
          }
 +
 +
          function init(element) {
 +
            if (element) {
 +
              chkMap(element)
 +
              scaleImageMap.call(element)
 +
              maps.push(element)
 +
            }
 +
          }
 +
 +
          var maps
 +
 +
          return function imageMapResizeF(target) {
 +
            maps = [] // Only return maps from this call
 +
 +
            switch (typeof target) {
 +
              case 'undefined':
 +
              case 'string':
 +
                Array.prototype.forEach.call(
 +
                  document.querySelectorAll(target || 'map'),
 +
                  init
 +
                )
 +
                break
 +
              case 'object':
 +
                init(target)
 +
                break
 +
              default:
 +
                throw new TypeError('Unexpected data type (' + typeof target + ').')
 +
            }
 +
 +
            return maps
 +
          }
 +
        }
 +
 +
        if (typeof define === 'function' && define.amd) {
 +
          define([], factory)
 +
        } else if (typeof module === 'object' && typeof module.exports === 'object') {
 +
          module.exports = factory() //Node for browserfy
 +
        } else {
 +
          window.imageMapResize = factory()
 +
        }
 +
 +
        if ('jQuery' in window) {
 +
          window.jQuery.fn.imageMapResize = function $imageMapResizeF() {
 +
            return this.filter('map')
 +
              .each(scaleImageMap)
 +
              .end()
 +
          }
 +
        }
 +
      })()
 +
    </script>
 +
  </head>
 +
  <body>
 
     <!-- ok cool here starts the image -->
 
     <!-- ok cool here starts the image -->
 
     <div class="picture">
 
     <div class="picture">
Line 113: Line 267:
 
       </div>
 
       </div>
 
     </div>
 
     </div>
  <script>imageMapResize();</script>
+
    <script>imageMapResize();</script>
 
   </body>
 
   </body>
 
</html>
 
</html>

Revision as of 21:40, 8 November 2020


Yo Momma

I love death, death is me.

Yo Dadda

Jk, my one true love is Zen-senpai

Oh no

Uuuurgh tabulators don't work in internet explorer you idiot!! aa asdas dasd asd asd asd asd asd asd asd asd asd asd asd asdasd assd

The saving

Jk, my one true love is Zen-senpai

The horror

Jk, my one true love is Zen-senpai

Double death

Jk, my one true love is Zen-senpai

Yo What do to now

Jk, my one true love is Zen-senpai

Yo im crying

Jk, my one true love is Zen-senpai