/home/desid573/public_html/family/pdd/app/webroot/admin/plugins/morris/lib
NameSizeModeActions
morris.area.coffee17510644editdlrm
morris.bar.coffee66770644editdlrm
morris.coffee10060644editdlrm
morris.donut.coffee58310644editdlrm
morris.grid.coffee143230644editdlrm
morris.hover.coffee11080644editdlrm
morris.line.coffee127070644editdlrm
Edit: /home/desid573/public_html/family/pdd/app/webroot/admin/plugins/morris/lib/morris.hover.coffee (1108B)
class Morris.Hover # Displays contextual information in a floating HTML div. @defaults: class: 'morris-hover morris-default-style' constructor: (options = {}) -> @options = $.extend {}, Morris.Hover.defaults, options @el = $ "
" @el.hide() @options.parent.append(@el) update: (html, x, y) -> if not html @hide() else @html(html) @show() @moveTo(x, y) html: (content) -> @el.html(content) moveTo: (x, y) -> parentWidth = @options.parent.innerWidth() parentHeight = @options.parent.innerHeight() hoverWidth = @el.outerWidth() hoverHeight = @el.outerHeight() left = Math.min(Math.max(0, x - hoverWidth / 2), parentWidth - hoverWidth) if y? top = y - hoverHeight - 10 if top < 0 top = y + 10 if top + hoverHeight > parentHeight top = parentHeight / 2 - hoverHeight / 2 else top = parentHeight / 2 - hoverHeight / 2 @el.css(left: left + "px", top: parseInt(top) + "px") show: -> @el.show() hide: -> @el.hide()