This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require('fs'); | |
execSync = require('child_process').execSync; | |
options = { | |
dir: 'd3-zoom', | |
file: 'README.md', | |
prefix: 'https://github.com/d3/d3-zoom/blob/master/', | |
delimiter: '#L', | |
suffix: ' ', | |
updateFile: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Usage example | |
function MODULE_do_something() { | |
$tid = MODULE_get_id('term_b'); | |
// Do stuff ... | |
} | |
// Initially, alias-id pairs are stored inside the function. | |
function MODULE_get_id($alias) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local development services. | |
# | |
# To activate this feature, follow the instructions at the top of the | |
# 'example.settings.local.php' file, which sits next to this file. | |
services: | |
cache.backend.null: | |
class: Drupal\Core\Cache\NullBackendFactory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const box = $groupsContainer.node().getBBox(); | |
const scale = Math.min(window.innerWidth / box.width, window.innerHeight / box.height); | |
// Reset transform. | |
let transform = d3.zoomIdentity; | |
// Center [0, 0]. | |
transform = transform.translate(window.innerWidth / 2, window.innerHeight / 2); | |
// Apply scale. | |
transform = transform.scale(scale); | |
// Center elements. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_boot(). | |
* | |
* Dynamically changes site_frontpage. Performs redirects. | |
*/ | |
function MODULE_boot() { | |
// Determine main domain and current domain |