This file contains 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
// Change font (ctrl a) | |
var doc = context.document, | |
selection = context.selection, | |
font_name = [doc askForUserInput:"Font name:" initialValue:"Arial"]; | |
function check_layer(layer){ | |
log(layer) | |
var className = layer.className() | |
log("Checking layer " + layer + " of klass: " + className) | |
if (className == "MSTextLayer") { |
It's pretty easy to do polymorphic associations in Rails: A Picture can belong to either a BlogPost or an Article. But what if you need the relationship the other way around? A Picture, a Text and a Video can belong to an Article, and that article can find all media by calling @article.media
This example shows how to create an ArticleElement join model that handles the polymorphic relationship. To add fields that are common to all polymorphic models, add fields to the join model.
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>OpenLayers Mobile</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<base href="http://openlayers.org/dev/examples/" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link rel="stylesheet" href="style.mobile.css" type="text/css"> | |
<script src="../OpenLayers.mobile.js"></script> |