Xantomen / GamesInputPal

http://xantomen.com/gamesinputpal/
GNU General Public License v3.0
2 stars 0 forks source link

Crisper lines, with something like Paper.js or Raphael.js #32

Closed Xantomen closed 8 years ago

Xantomen commented 8 years ago

Awesome! Found this guy making nice CSS3 Lines:

http://www.monkeyandcrow.com/blog/drawing_lines_with_css3/

It fits my purpose better than an SVG library would, I think, so that's done.

Might encounter some browser compatibility issues.

Refactored the code for that new library, deleted JSGraphics, and important! I had to modify that code I use to make Titles print in the correct color in order to print the Lines correctly. Now it's:

            var s = '';
            s += '<style id="print-style-tag" media="print">#game_title_text {color: ';
            s += desired_title_color+' !important;}';

            s += '.drawLine {background-color: '+gameColorLines+' !important; }';
            s += '</style>';

            $(s).appendTo('head');
Xantomen commented 8 years ago

I also added the class .no_print { display: none !important; } to the @media part of the CSS, and I add it or remove it before Printing to Lines that are linked with Empty/Full Text Labels. This is so you won't print Lines going to empty labels.

Neaatto.