Skip to content

Instantly share code, notes, and snippets.

View occupant's full-sized avatar

James occupant

  • University of British Columbia
  • Vancouver, BC
View GitHub Profile
@aibrean
aibrean / map-scroll.js
Created February 11, 2015 20:55
Enable Google map zooming on click only (disable scrolling)
// Disable scroll zooming and bind back the click event
var onMapMouseleaveHandler = function (event) {
var that = $(this);
that.on('click', onMapClickHandler);
that.off('mouseleave', onMapMouseleaveHandler);
that.find('iframe').css("pointer-events", "none");
// pointer-events needs to be added as a style on the iframe
}
@agentolivia
agentolivia / panesandblocks.inc
Last active May 26, 2016 17:02 — forked from anonymous/gist:5745928
Example of CTools Style Plugin dot inc file.
<?php
/**
* Defines a style plugin
*
* - panesandblocks: corresponds to directory name of plugin
* - render pane: the suffix of the theme function for the pane (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_pane",
* the value of "render pane" is "panesandblocks_render_pane".
* - render region: the suffix of the theme function for the region (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_region",