Skip to content

Instantly share code, notes, and snippets.

@joeberkovitz
joeberkovitz / leaflet-grid-tile-blend.js
Last active April 6, 2023 11:54
Leaflet grid tile blend bug example
var TestLayer = L.GridLayer.extend({
createTile: function(coords){
var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svgElement.setAttribute('xmlns', "http://www.w3.org/2000/svg");
svgElement.setAttribute('viewBox', "0 0 256 256");
svgElement.setAttribute('style', "overflow: visible;");
svgElement.innerHTML = '<circle r="50" fill="#339999"/><circle r="50" cx="200" cy="0" fill="#339999"/>';
var tile = svgElement;
var size = this.getTileSize();
tile.width = size.x;
<html>
<head>
<style>
.pxsize {
font-size: 96px;
}
.insize {
font-size: 1.0in;
}
</style>
@joeberkovitz
joeberkovitz / styling.md
Last active November 12, 2021 19:13
Draft issue proposal for styling

Preamble

The idea of MNX style properties and classes was first presented in the original draft spec. That proposal was rejected some time ago, and is not part of 1.0. It relied on CSS syntax, it was overcomplicated, and it didn't anticipate <system-layout> or <score>.

However, there's still a need for style properties as evidenced by the fact that styles and classes have been proposed multiple times in the CG to solve problems with text, dynamics, graphics, repeats. Each proposal has been a little different. It makes sense to revisit styles and address them in a way that's more uniform. That way we can have a single useful tool that can be rolled out repeatedly when we need it. This proposal tries to put forth a new vision of styles and how they fit into MNX 1.0.

This proposal is big enough to need a fair amount of up-front rationales and definitions before getting into the meat of it all, so thanks for your patience in read

@joeberkovitz
joeberkovitz / approaches.md
Last active March 12, 2018 19:05
Approaches to standardizing CWMN horizontal layout

Introduction

This document examines possible approaches to standardizing CWMN horizontal layout in MNX.

An attempt is made to analyze horizontal layout into a sequence of well-defined phases, expressed in terms of an underlying layout model. For each phase, a set of controlling style properties are proposed.

Producer Impact

For producers, these properties allow an implementation to express the results of its own layout decisions in a portable fashion by encoding them as style properties.

Consumer Impact

<!doctype html>
<!--
Example of a DOM-based music notation application that assesses a user's ability
to identify the roots of randomly voiced triads. jQuery is used to manipulate a
a MusicXML DOM and to respond to user interaction gestures on the displayed notation.
-->
<html>
<head>