{"id":1253,"date":"2018-10-24T22:05:31","date_gmt":"2018-10-24T22:05:31","guid":{"rendered":"https:\/\/lab.florianschwarz.net\/PennController\/?post_type=yada_wiki&#038;p=1253"},"modified":"2018-10-29T22:53:38","modified_gmt":"2018-10-29T22:53:38","slug":"tooltip-settings-position","status":"publish","type":"yada_wiki","link":"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/tooltip-settings-position\/","title":{"rendered":"tooltip.settings.position"},"content":{"rendered":"<p class='command-format'><code>getTooltip(id).settings.position(\"position\")<\/code> <em>(since beta 0.3)<\/em><\/p>\n<p>Defines the relative position of the tooltip when it is attached to an element (bottom-right by default).<\/p>\n<p>If <em>position<\/em> contains <em>top<\/em>, the bottom edge of the tooltip will be aligned with the top edge of the element to which it is attached. If it contains <em>middle<\/em>, the vertical middle axis of the tooltip will be aligned with that of the element to which it is attached. If it contains <em>bottom<\/em>, the top edge of the tooltip will be aligned with the bottom edge of the element to which it is attached.<\/p>\n<p>If <em>position<\/em> contains <em>left<\/em>, the right edge of the tooltip will be aligned with the left edge of the element to which it is attached. If it contains <em>center<\/em>, the horizontal middle axis of the tooltip will be aligned with that of the element to which it is attached. If it contains <em>right<\/em>, the left edge of the tooltip will be aligned with the right edge of the element to which it is attached.<\/p>\n<p>You can use CSS to define margins to adjust the alignment of tooltips.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>[js highlight=&#8221;5&#8243; try=&#8221;true&#8221;]newImage(&#8220;myImage&#8221;, &#8220;square.png&#8221;)<br \/>\n    .print()<br \/>\n,<br \/>\nnewTooltip(&#8220;myTooltip&#8221;, &#8220;This is a square&#8221;)<br \/>\n    .settings.position(&#8220;top center&#8221;)<br \/>\n    .print( getImage(&#8220;myImage&#8221;) )<br \/>\n    .wait()<br \/>\n[\/js]<\/p>\n<p>Adds an image to the page and places a tooltip reading <em>This is a square<\/em> above the image, horizontally centered to its middle axis.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"wiki_cats":[13,5,4,14,27],"wiki_tags":[],"class_list":["post-1253","yada_wiki","type-yada_wiki","status-publish","hentry","wiki_cats-command","wiki_cats-documentation","wiki_cats-element","wiki_cats-settings-command","wiki_cats-tooltip-element"],"_links":{"self":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki"}],"about":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/types\/yada_wiki"}],"author":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/comments?post=1253"}],"version-history":[{"count":3,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1253\/revisions"}],"predecessor-version":[{"id":1499,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1253\/revisions\/1499"}],"wp:attachment":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/media?parent=1253"}],"wp:term":[{"taxonomy":"wiki_cats","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_cats?post=1253"},{"taxonomy":"wiki_tags","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_tags?post=1253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}