🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

self-cellular-layout-react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

self-cellular-layout-react - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+12
-4
lib/components/CellularLayout.js

@@ -82,3 +82,3 @@ 'use strict';

});
return list;
return { list: list, row: row };
}

@@ -99,7 +99,15 @@ }, {

// const colEmpty = Math.floor(colmun/2); // 首行空格数
var imgList = this.getImgList(colmun, colmun2);
var _getImgList = this.getImgList(cols, colmun, colmun2, colEmpty),
list = _getImgList.list,
row = _getImgList.row;
var height = row % 2 ? Math.floor(row / 2) * boxAllH + boxAllH : Math.floor(row / 2) * boxAllH + boxAllH / 2;
return _react2.default.createElement(
'div',
{ style: { width: width + 'px' } },
imgList.map(function (item, index) {
{ style: {
width: width + 'px',
height: height + 'px'
} },
list.map(function (item, index) {
return _react2.default.createElement(

@@ -106,0 +114,0 @@ 'div',

{
"name": "self-cellular-layout-react",
"version": "1.0.2",
"version": "1.0.3",
"description": "6边形蜂窝布局react组件",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -50,3 +50,3 @@ import React, { Component } from 'react';

})
return list;
return {list,row};
}

@@ -60,6 +60,10 @@ render() {

// const colEmpty = Math.floor(colmun/2); // 首行空格数
const imgList = this.getImgList(colmun, colmun2);
const {list, row} = this.getImgList(cols, colmun, colmun2, colEmpty);
const height = row%2 ? Math.floor(row/2)*boxAllH + boxAllH : Math.floor(row/2)*boxAllH + boxAllH/2;
return (
<div style={{width: width+'px'}}>
{imgList.map((item,index) => {
<div style={{
width: width+'px',
height: height+'px'
}}>
{list.map((item,index) => {
return (

@@ -66,0 +70,0 @@ <div className="cellular_row_box" key={index} data-index={index}