UNPKG

shubhadownloader

Version:

There is large amount of information available in market place. The markets are always in sync. In today's world investors find it very difficult to make effective use of information available to them. Shubha Downloader is great tool which resolves this problem and helps investor to increase his productivity and stay focused on decision making. Shubha Downloader enable end user to download market data from available sources and organize it. Shubha Downloader is Open source & FREE utility for end users. Shubha Downloader have main features as follows End of the day market data from web to your favorite charting application . Fundamental market data from web to your favorite charting application. Market reports from web to your favorite charting application.

100 lines (81 loc) 3.1 kB
/** * This layout manager is used to center contents within a container. As a subclass of * {@link Ext.layout.container.Fit fit layout}, CenterLayout expects to have one child * item; multiple items will be placed overlapping. The layout does not require any config * options. Items in the container can use percentage width or height rather than be fit * to the full size of the container. * * Example usage: * * // The content panel is centered in the container * * var p = Ext.create('Ext.Panel', { * title: 'Center Layout', * layout: 'ux.center', * items: [{ * title: 'Centered Content', * width: '75%', // assign 75% of the container width to the item * html: 'Some content' * }] * }); * * If you leave the title blank and specify no border you can create a non-visual, structural * container just for centering the contents. * * var p = Ext.create('Ext.Container', { * layout: 'ux.center', * items: [{ * title: 'Centered Content', * width: 300, * height: '90%', // assign 90% of the container height to the item * html: 'Some content' * }] * }); */ Ext.define('Ext.ux.layout.Center', { extend: 'Ext.layout.container.Fit', alias: 'layout.ux.center', percentRe: /^\d+(?:\.\d+)?\%$/, itemCls: 'ux-layout-center-item', initLayout: function () { this.callParent(arguments); this.owner.addCls('ux-layout-center'); }, getItemSizePolicy: function (item) { var policy = this.callParent(arguments); if (typeof item.width == 'number') { policy = this.sizePolicies[policy.setsHeight ? 2 : 0]; } return policy; }, getPos: function (itemContext, info, dimension) { var size = itemContext.props[dimension] + info.margins[dimension], pos = Math.round((info.targetSize[dimension] - size) / 2); return Math.max(pos, 0); }, getSize: function (item, info, dimension) { var ratio = item[dimension]; if (typeof ratio == 'string' && this.percentRe.test(ratio)) { ratio = parseFloat(ratio) / 100; } else { ratio = item[dimension + 'Ratio']; // backwards compat } return info.targetSize[dimension] * (ratio || 1) - info.margins[dimension]; }, positionItemX: function (itemContext, info) { var left = this.getPos(itemContext, info, 'width'); itemContext.setProp('x', left); }, positionItemY: function (itemContext, info) { var top = this.getPos(itemContext, info, 'height'); itemContext.setProp('y', top); }, setItemHeight: function (itemContext, info) { var height = this.getSize(itemContext.target, info, 'height'); itemContext.setHeight(height); }, setItemWidth: function (itemContext, info) { var width = this.getSize(itemContext.target, info, 'width'); itemContext.setWidth(width); } });