001/*
002 * #%L
003 * GwtMaterial
004 * %%
005 * Copyright (C) 2015 - 2017 GwtMaterialDesign
006 * %%
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 * 
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 * 
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 * #L%
019 */
020package gwt.material.design.addins.client.masonry.js;
021
022import gwt.material.design.addins.client.base.constants.AddinsCssName;
023import jsinterop.annotations.JsOverlay;
024import jsinterop.annotations.JsPackage;
025import jsinterop.annotations.JsProperty;
026import jsinterop.annotations.JsType;
027
028/**
029 * Options for masonry component
030 *
031 * @author kevzlou7979
032 */
033@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
034public class JsMasonryOptions {
035
036    private JsMasonryOptions() {}
037
038    @JsOverlay
039    public static final JsMasonryOptions create() {
040        JsMasonryOptions options = new JsMasonryOptions();
041        options.itemSelector = ".masonry > .col";
042        options.columnWidth = "." + AddinsCssName.COL_SIZER;
043        options.percentPosition = true;
044        options.originLeft = true;
045        options.originTop = true;
046        options.transitionDuration = "400ms";
047        return options;
048    }
049
050    @JsProperty
051    public String itemSelector;
052
053    @JsProperty
054    public boolean percentPosition;
055
056    @JsProperty
057    public boolean originLeft;
058
059    @JsProperty
060    public boolean originTop;
061
062    @JsProperty
063    public String transitionDuration;
064
065    @JsProperty
066    public String columnWidth;
067}