function getFullUrl(localId, gd) {
    if(!localId) return null;

    var context = gd._context;
    var baseUrl = context._exportedPlot ? '' : (context._baseUrl || '');
    return baseUrl ?
        'url(\'' + baseUrl + '#' + localId + '\')' :
        'url(#' + localId + ')';
}
Set clipPath URL in a way that work for all situations.

In details, graphs on pages with <base> HTML tags need to prepend
the clip path ids with the page's base url EXCEPT during toImage exports.

@param {d3 selection} s : node to add clip-path attribute
@param {string} localId : local clip-path (w/o base url) id
@param {DOM element || object} gd
- context._baseUrl {string}
- context._exportedPlot {boolean}